remove check for Tool stage from SpringModule as it is no longer required
This commit is contained in:
committed by
Dave Syer
parent
8cbdf37570
commit
5e3603c29d
@@ -19,6 +19,7 @@ import javax.inject.Named;
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -36,6 +37,11 @@ import static org.junit.Assert.assertNotNull;
|
||||
*/
|
||||
public class EnableGuiceModulesTests {
|
||||
|
||||
@After
|
||||
public void cleanUp() {
|
||||
System.clearProperty("spring.guice.dedup");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
|
||||
@@ -43,6 +49,15 @@ public class EnableGuiceModulesTests {
|
||||
assertNotNull(context.getBean(Foo.class));
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithDedupFeatureEnabled() {
|
||||
System.setProperty("spring.guice.dedup", "true");
|
||||
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
|
||||
TestConfig.class);
|
||||
assertNotNull(context.getBean(Foo.class));
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void module() {
|
||||
|
||||
Reference in New Issue
Block a user