remove check for Tool stage from SpringModule as it is no longer required

This commit is contained in:
Taylor Wicksell
2018-03-01 05:00:41 -06:00
committed by Dave Syer
parent 8cbdf37570
commit 5e3603c29d
2 changed files with 31 additions and 18 deletions

View File

@@ -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() {