Search in sources :

Example 1 with WireMockServerRunner

use of com.github.tomakehurst.wiremock.standalone.WireMockServerRunner in project wiremock by wiremock.

the class StandaloneAcceptanceTest method startRunner.

private void startRunner(String... args) {
    runner = new WireMockServerRunner();
    runner.run(argsWithPort(argsWithRecordingsPath(args)));
    int port = runner.port();
    testClient = new WireMockTestClient(port);
    WireMock.configureFor(port);
}
Also used : WireMockTestClient(com.github.tomakehurst.wiremock.testsupport.WireMockTestClient) WireMockServerRunner(com.github.tomakehurst.wiremock.standalone.WireMockServerRunner)

Example 2 with WireMockServerRunner

use of com.github.tomakehurst.wiremock.standalone.WireMockServerRunner in project wiremock by wiremock.

the class StandaloneAcceptanceTest method isRunningReturnsFalseBeforeRunMethodIsExecuted.

@Test
public void isRunningReturnsFalseBeforeRunMethodIsExecuted() {
    runner = new WireMockServerRunner();
    assertThat(runner.isRunning(), is(false));
}
Also used : WireMockServerRunner(com.github.tomakehurst.wiremock.standalone.WireMockServerRunner) Test(org.junit.jupiter.api.Test)

Example 3 with WireMockServerRunner

use of com.github.tomakehurst.wiremock.standalone.WireMockServerRunner in project wiremock by wiremock.

the class StandaloneAcceptanceTest method init.

@BeforeEach
public void init() throws Exception {
    if (FILE_SOURCE_ROOT.exists()) {
        FileUtils.deleteDirectory(FILE_SOURCE_ROOT);
    }
    FILE_SOURCE_ROOT.mkdirs();
    mappingsDirectory = new File(FILE_SOURCE_ROOT, MAPPINGS);
    filesDirectory = new File(FILE_SOURCE_ROOT, FILES);
    runner = new WireMockServerRunner();
    WireMock.configure();
}
Also used : WireMockServerRunner(com.github.tomakehurst.wiremock.standalone.WireMockServerRunner) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

WireMockServerRunner (com.github.tomakehurst.wiremock.standalone.WireMockServerRunner)3 WireMockTestClient (com.github.tomakehurst.wiremock.testsupport.WireMockTestClient)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 Test (org.junit.jupiter.api.Test)1