replace generateStubs with convert (#5)
This commit is contained in:
@@ -35,7 +35,7 @@ public class PluginIT {
|
||||
.assertErrorFreeLog()
|
||||
.assertLogText("Generating server tests source code for Accurest contract verification")
|
||||
.assertLogText("Generated 1 test classes.")
|
||||
.assertLogText("Accurest Plugin: Invoking GroovyDSL to WireMock client stubs conversion")
|
||||
.assertLogText("Converting from accurest contracts written in GroovyDSL to WireMock stubs mappings")
|
||||
.assertLogText("Creating new json")
|
||||
.assertErrorFreeLog();
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class PluginIT {
|
||||
.assertErrorFreeLog()
|
||||
.assertLogText("Generating server tests source code for Accurest contract verification")
|
||||
.assertLogText("Generated 1 test classes.")
|
||||
.assertLogText("Accurest Plugin: Invoking GroovyDSL to WireMock client stubs conversion")
|
||||
.assertLogText("Converting from accurest contracts written in GroovyDSL to WireMock stubs mappings")
|
||||
.assertLogText("Creating new json")
|
||||
.assertErrorFreeLog();
|
||||
}
|
||||
|
||||
@@ -22,21 +22,21 @@ public class PluginUnitTest {
|
||||
@Test
|
||||
public void shouldGenerateWireMockStubsInDefaultLocation() throws Exception {
|
||||
File basedir = resources.getBasedir("basic");
|
||||
maven.executeMojo(basedir, "generateStubs");
|
||||
maven.executeMojo(basedir, "convert");
|
||||
assertFilesPresent(basedir, "target/mappings/Sample.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGenerateWireMockFromStubsDirectory() throws Exception {
|
||||
File basedir = resources.getBasedir("withStubs");
|
||||
maven.executeMojo(basedir, "generateStubs", newParameter("contractsDir", "/src/test/resources/stubs"));
|
||||
maven.executeMojo(basedir, "convert", newParameter("contractsDir", "src/test/resources/stubs"));
|
||||
assertFilesPresent(basedir, "target/mappings/Sample.json");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGenerateWireMockStubsInSelectedLocation() throws Exception {
|
||||
File basedir = resources.getBasedir("basic");
|
||||
maven.executeMojo(basedir, "generateStubs", newParameter("mappingsDir", "foo"));
|
||||
maven.executeMojo(basedir, "convert", newParameter("mappingsDir", "foo"));
|
||||
assertFilesPresent(basedir, "target/foo/Sample.json");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user