contracts directory instead of stubs

This commit is contained in:
Mariusz Smykula
2016-03-28 13:16:58 +02:00
parent 646f279dd7
commit 1b9e1cf24d
9 changed files with 27 additions and 12 deletions

View File

@@ -25,6 +25,13 @@ public class PluginUnitTest {
assertFilesPresent(basedir, "target/mappings/Sample.json");
}
@Test
public void shouldGenerateWiremockFromStubsDirectory() throws Exception {
File basedir = resources.getBasedir("withStubs");
maven.executeMojo(basedir, "generateStubs", TestMavenRuntime.newParameter("contractsDir", "/src/test/resources/stubs"));
assertFilesPresent(basedir, "target/mappings/Sample.json");
}
@Test
public void shouldGenerateWiremockStubsInSelectedLocation() throws Exception {
File basedir = resources.getBasedir("basic");
@@ -32,13 +39,6 @@ public class PluginUnitTest {
assertFilesPresent(basedir, "target/foo/Sample.json");
}
@Test
public void shouldGenerateWiremockStubsInSelectedLocation2() throws Exception {
File basedir = resources.getBasedir("customContractsLocation");
maven.executeMojo(basedir, "generateStubs", TestMavenRuntime.newParameter("contractsDir", "src/foo"));
assertFilesPresent(basedir, "target/mappings/Sample.json");
}
@Test
public void shouldGenerateContractSpecificationInDefaultLocation() throws Exception {
File basedir = resources.getBasedir("basic");