use of com.github.tomakehurst.wiremock.common.ConsoleNotifier in project zulip-java-client by jamesnetherton.
the class ZulipApiTestBase method beforeAll.
@BeforeAll
public static void beforeAll() throws ZulipClientException {
server = new WireMockServer(options().dynamicPort().stubRequestLoggingDisabled(false).notifier(new ConsoleNotifier(false)));
server.start();
zulip = new Zulip.Builder().email("test@test.com").apiKey("test-key").site("http://localhost:" + server.port()).build();
}
use of com.github.tomakehurst.wiremock.common.ConsoleNotifier in project PostExamples by deesebc.
the class FeignRetryableTest method setup.
@BeforeAll
public static void setup() {
bookClient = Feign.builder().client(new OkHttpClient()).encoder(new GsonEncoder()).decoder(new GsonDecoder()).logger(new Slf4jLogger(BookClient.class)).logLevel(Logger.Level.FULL).retryer(new feign.Retryer.Default(100, 1000, 3)).errorDecoder(new CustomErrorDecode()).options(new Request.Options(2, TimeUnit.SECONDS, 4, TimeUnit.SECONDS, true)).target(BookClient.class, "http://localhost:57005/api/books");
wireMockServer = new WireMockServer(WireMockConfiguration.wireMockConfig().withRootDirectory(FOLDER).port(57005).notifier(new ConsoleNotifier(true)));
wireMockServer.start();
}
use of com.github.tomakehurst.wiremock.common.ConsoleNotifier in project PostExamples by deesebc.
the class FeignRibbon method setup.
@BeforeAll
public static void setup() {
// config.properties include: discovery-client.ribbon.listOfServers=localhost:57010,localhost:57011
bookClient = Feign.builder().client(RibbonClient.create()).decoder(new GsonDecoder()).logger(new Slf4jLogger(BookClient.class)).logLevel(Logger.Level.FULL).target(BookClient.class, "http://discovery-client/api/books");
wireMockServer1 = new WireMockServer(WireMockConfiguration.wireMockConfig().withRootDirectory(FOLDER).port(57010).notifier(new ConsoleNotifier(true)));
wireMockServer1.start();
wireMockServer1.stubFor(get(urlPathEqualTo("/api/books")).willReturn(aResponse().withBodyFile("books.json")));
wireMockServer2 = new WireMockServer(WireMockConfiguration.wireMockConfig().withRootDirectory(FOLDER).port(57011).notifier(new ConsoleNotifier(true)));
wireMockServer2.start();
wireMockServer2.stubFor(get(urlPathEqualTo("/api/books")).willReturn(aResponse().withBodyFile("books.json")));
}
use of com.github.tomakehurst.wiremock.common.ConsoleNotifier in project PostExamples by deesebc.
the class FeignRibbonTest method setup.
@BeforeAll
public static void setup() {
// config.properties include: discovery-client.ribbon.listOfServers=localhost:57010,localhost:57011
// getConfigInstance().setProperty("discovery-client.ribbon.listOfServers", "localhost:57010,localhost:57011");
bookClient = Feign.builder().client(RibbonClient.create()).encoder(new GsonEncoder()).decoder(new GsonDecoder()).logger(new Slf4jLogger(BookClient.class)).logLevel(Logger.Level.FULL).target(BookClient.class, "http://discovery-client/api/books");
wireMockServer1 = new WireMockServer(WireMockConfiguration.wireMockConfig().withRootDirectory(FOLDER).port(57010).notifier(new ConsoleNotifier(true)));
wireMockServer1.start();
wireMockServer1.stubFor(get(urlPathEqualTo("/api/books")).willReturn(aResponse().withBodyFile("books.json")));
wireMockServer2 = new WireMockServer(WireMockConfiguration.wireMockConfig().withRootDirectory(FOLDER).port(57011).notifier(new ConsoleNotifier(true)));
wireMockServer2.start();
wireMockServer2.stubFor(get(urlPathEqualTo("/api/books")).willReturn(aResponse().withBodyFile("books.json")));
}
use of com.github.tomakehurst.wiremock.common.ConsoleNotifier in project PostExamples by deesebc.
the class FeignTest method setup.
@BeforeAll
public static void setup() {
bookClient = Feign.builder().client(new OkHttpClient()).encoder(new GsonEncoder()).decoder(new GsonDecoder()).logger(new Slf4jLogger(BookClient.class)).logLevel(Logger.Level.FULL).target(BookClient.class, "http://localhost:57010/api/books");
wireMockServer = new WireMockServer(WireMockConfiguration.wireMockConfig().withRootDirectory(FOLDER).port(57010).notifier(// .httpsPort(57005).keystorePath(FOLDER + "/identity.jks")
new ConsoleNotifier(true)));
wireMockServer.start();
}
Aggregations