New issue 28 by philippe.tseyen: GuiceyFruit does not execute
@PostConstruct in super class
http://code.google.com/p/guiceyfruit/issues/detail?id=28
@Test
public void testPostConstruct()
{
AbstractModule module = new AbstractModule()
{
@Override
protected void configure() {
bind(PostConstruct.class);
}
};
Module combine = Modules.combine(module, new Jsr250Module());
Injector createInjector = Guice.createInjector(combine);
PostConstruct instance = createInjector.getInstance(PostConstruct.class);
assertEquals(2, instance.collector.size());
assertEquals("superPostConstruct", instance.collector.get(0));
assertEquals("postConstruct", instance.collector.get(1));
}
@Singleton
public static class SuperPostConstruct
{
public List<String> collector = new ArrayList<String>();
@javax.annotation.PostConstruct
public void superPostConstruct()
{
collector.add("superPostConstruct");
}
}
@Singleton
public static class PostConstruct extends SuperPostConstruct
{
@javax.annotation.PostConstruct
public void postConstruct()
{
collector.add("postConstruct");
}
}
Guice 2.0, GuiceyFruit 2.0
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Same here..