org.spincast.defaults.tests.SpincastDefaultTestingModule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-testing-default Show documentation
Show all versions of spincast-testing-default Show documentation
Provides utilities to tests using the default Guice module and components.
The newest version!
package org.spincast.defaults.tests;
import org.spincast.core.config.ISpincastConfig;
import org.spincast.defaults.guice.SpincastDefaultGuiceModule;
import org.spincast.plugins.config.SpincastConfigPluginGuiceModule;
import org.spincast.plugins.httpclient.websocket.SpincastHttpClientWithWebsocketPluginGuiceModule;
import org.spincast.testing.core.SpincastTestConfig;
/**
* Testing module using the default implementations
* for the required components.
*/
public class SpincastDefaultTestingModule extends SpincastDefaultGuiceModule {
public SpincastDefaultTestingModule() {
this(null);
}
public SpincastDefaultTestingModule(String[] mainArgs) {
super(mainArgs);
}
@Override
protected void configure() {
super.configure();
//==========================================
// Install the Spincast HTTP Client with Websocket
// support module.
//==========================================
install(new SpincastHttpClientWithWebsocketPluginGuiceModule(getRequestContextType(), getWebsocketContextType()));
}
@Override
protected void bindConfigPlugin() {
install(new SpincastConfigPluginGuiceModule(getRequestContextType(), getWebsocketContextType()) {
@Override
protected Class extends ISpincastConfig> getSpincastConfigImplClass() {
return getSpincastConfigClass();
}
});
}
protected Class extends ISpincastConfig> getSpincastConfigClass() {
return SpincastTestConfig.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy