public abstract class GuiceTestCase extends Object implements com.google.inject.Module
Constructor and Description |
---|
GuiceTestCase() |
Modifier and Type | Method and Description |
---|---|
void |
configure(com.google.inject.Binder binder)
A default, empty implementation is provided as the test may not have any of its own objects to bind.
|
protected void |
configureOverrideBindings(com.google.inject.Binder binder)
Bindings specified on this binder will be used to override
bindings specified in
configure(Binder) and via the
GuiceModules annotation. |
void |
setupGuiceModules()
Binds this object and any modules declared from the GuiceModules annotation in an injector, and registers it
in the InjectorHolder.
|
void |
teardownGuiceModules()
After the test method has run, the injector is reset to its old value.
|
@BeforeMethod public void setupGuiceModules() throws Exception
Exception
- Thrown on failure of any type.@AfterMethod public void teardownGuiceModules() throws Exception
Exception
- Thrown on failure of any type.public void configure(com.google.inject.Binder binder)
configure
in interface com.google.inject.Module
binder
- The Guice binder.protected void configureOverrideBindings(com.google.inject.Binder binder)
configure(Binder)
and via the
GuiceModules
annotation.binder
- The Guice binder.Copyright © 2025 Open Identity Platform Community. All rights reserved.