use of org.apache.cayenne.di.mock.MockInterface1_Decorator5 in project cayenne by apache.
the class DefaultInjectorDecorationTest method testSingleDecorator_Provider_FieldInjection.
@Test
public void testSingleDecorator_Provider_FieldInjection() {
Module module = binder -> {
binder.bind(MockInterface1.class).to(MockImplementation1.class);
binder.decorate(MockInterface1.class).before(MockInterface1_Decorator5.class);
};
DefaultInjector injector = new DefaultInjector(module);
MockInterface1 service = injector.getInstance(MockInterface1.class);
assertNotNull(service);
assertEquals("[5MyName5]", service.getName());
}
Aggregations