generating specs

This commit is contained in:
Mariusz Smykula
2016-03-26 20:48:02 +01:00
parent 872940d0a9
commit dd2d203742
5 changed files with 141 additions and 24 deletions

View File

@@ -19,17 +19,24 @@ public class PluginUnitTest {
public final TestMavenRuntime maven = new TestMavenRuntime();
@Test
public void shouldGenerateWarlockStubsInDefaultLocation() throws Exception {
public void shouldGenerateWiremockStubsInDefaultcLocation() throws Exception {
File basedir = resources.getBasedir("basic");
maven.executeMojo(basedir, "generateStubs");
assertFilesPresent(basedir, "target/mappings/Sample.json");
}
@Test
public void shouldGenerateWarlockStubsInSelectedLocation() throws Exception {
public void shouldGenerateWiremockStubsInSelectedLocation() throws Exception {
File basedir = resources.getBasedir("basic");
maven.executeMojo(basedir, "generateStubs", TestMavenRuntime.newParameter("mappingsDir", "foo"));
assertFilesPresent(basedir, "target/foo/Sample.json");
}
@Test
public void shouldGenerateContractSpecificationInDefaultLocation() throws Exception {
File basedir = resources.getBasedir("basic");
maven.executeMojo(basedir, "generateSpecs");
assertFilesPresent(basedir,
"target/generated-sources/accurest/io/codearte/accurest/tests/AccurestSpec.groovy");
}
}