Package com.github.tomakehurst.wiremock.common

Examples of com.github.tomakehurst.wiremock.common.SingleRootFileSource


    @Rule
    public final TemporaryFolder tempDir = new TemporaryFolder();

    @Test
    public void instantiationWithEmptyFileSource() throws IOException {
        Options options = new WireMockConfiguration().fileSource(new SingleRootFileSource(tempDir.getRoot()));

        WireMockServer wireMockServer = null;
        try {
            wireMockServer = new WireMockServer(options);
            wireMockServer.start();
View Full Code Here


    }

    @BeforeClass
    public static void setupServer() {
        resetFileSourceRoot();
        setupServer(wireMockConfig().fileSource(new SingleRootFileSource(FILE_SOURCE_ROOT)));
    }
View Full Code Here

    }

    @Test
  public void mappingsLoadedFromJsonFiles() {
        buildWireMock(wireMockConfig());
        wireMockServer.loadMappingsUsing(new JsonFileMappingsLoader(new SingleRootFileSource("src/test/resources/test-requests")));

    WireMockResponse response = testClient.get("/canned/resource/1");
    assertThat(response.statusCode(), is(200));

    response = testClient.get("/canned/resource/2");
View Full Code Here

TOP

Related Classes of com.github.tomakehurst.wiremock.common.SingleRootFileSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.