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