use of org.webpieces.microsvc.client.api.RESTClientCreator in project webpieces by deanhiller.
the class CompanyTest method initialize.
public void initialize() {
log.info("Setting up test");
// Necessary to avoid errors that could be confusing to developers...(fail early instead with what is wrong)
Asserts.assertWasCompiledWithParamNames("test");
try {
startServer();
} catch (IOException ex) {
throw SneakyThrow.sneak(ex);
}
if (serverHttpAddr == null || serverHttpsAddr == null)
throw new IllegalStateException("startServer method forgot to set the serverHttpAddr and serverHttpsAddr");
simulateContext();
Http2Client http2Client = getClient();
Injector injector = Guice.createInjector(new ClientTestModule(http2Client));
restClientCreator = injector.getInstance(RESTClientCreator.class);
initialized = true;
}
Aggregations