this.service = service;
}
}
public void testDefaultPicoContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter() {
DefaultContainer picoContainer = new DefaultContainer();
picoContainer.registerConstructor(Service.class);
picoContainer.registerComponent(TransientComponent.class,
Components.ctor(TransientComponent.class));
TransientComponent c1 = (TransientComponent) picoContainer.getInstance(TransientComponent.class);
TransientComponent c2 = (TransientComponent) picoContainer.getInstance(TransientComponent.class);
assertNotSame(c1, c2);
assertSame(c1.service, c2.service);
}