use of org.forgerock.guice.core.GuiceModuleLoader in project OpenAM by OpenRock.
the class JavaScriptValidatorTest method setupGuiceModules.
@BeforeMethod
@Override
public void setupGuiceModules() throws Exception {
//This ensures that the other Guice modules on the classpath don't get
//loaded as Guice will balk.
InjectorConfiguration.setGuiceModuleLoader(new GuiceModuleLoader() {
@Override
public Set<Class<? extends Module>> getGuiceModules(Class<? extends Annotation> aClass) {
return new HashSet<>();
}
});
super.setupGuiceModules();
}
use of org.forgerock.guice.core.GuiceModuleLoader in project OpenAM by OpenRock.
the class RestRouterIT method setupGuiceModules.
@BeforeMethod(dependsOnMethods = "setupMocks")
@Override
public void setupGuiceModules() throws Exception {
InjectorConfiguration.setGuiceModuleLoader(new GuiceModuleLoader() {
@Override
public Set<Class<? extends Module>> getGuiceModules(Class<? extends Annotation> clazz) {
return new HashSet<>();
}
});
super.setupGuiceModules();
}
use of org.forgerock.guice.core.GuiceModuleLoader in project OpenAM by OpenRock.
the class IdRepoTestBase method setUpSuite.
@BeforeClass
public void setUpSuite() throws Exception {
InjectorConfiguration.setGuiceModuleLoader(new GuiceModuleLoader() {
@Override
public Set<Class<? extends Module>> getGuiceModules(Class<? extends Annotation> aClass) {
return Collections.<Class<? extends Module>>singleton(TestGuiceModule.class);
}
});
PowerMockito.mockStatic(WebtopNaming.class);
idRepoListener = PowerMockito.mock(IdRepoListener.class);
when(WebtopNaming.getAMServerID()).thenReturn("01");
when(WebtopNaming.getSiteID(eq("01"))).thenReturn("02");
memoryBackend = decorateBackend(new MemoryBackend(new LDIFEntryReader(getClass().getResourceAsStream(getLDIFPath()))));
}
use of org.forgerock.guice.core.GuiceModuleLoader in project OpenAM by OpenRock.
the class GroovyValidatorTest method setupGuiceModules.
@BeforeMethod
@Override
public void setupGuiceModules() throws Exception {
//This ensures that the other Guice modules on the classpath don't get
//loaded as Guice will balk.
InjectorConfiguration.setGuiceModuleLoader(new GuiceModuleLoader() {
@Override
public Set<Class<? extends Module>> getGuiceModules(Class<? extends Annotation> aClass) {
return new HashSet<>();
}
});
super.setupGuiceModules();
}
Aggregations