diff options
Diffstat (limited to 'validate/sample-yaml-generator')
-rw-r--r-- | validate/sample-yaml-generator/pom.xml | 6 | ||||
-rw-r--r-- | validate/sample-yaml-generator/src/test/java/org/onap/cli/sample/yaml/SampleYamlGeneratorTest.java | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/validate/sample-yaml-generator/pom.xml b/validate/sample-yaml-generator/pom.xml index 80480915..5733bf04 100644 --- a/validate/sample-yaml-generator/pom.xml +++ b/validate/sample-yaml-generator/pom.xml @@ -50,6 +50,12 @@ <version>1.19</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.8.2</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/validate/sample-yaml-generator/src/test/java/org/onap/cli/sample/yaml/SampleYamlGeneratorTest.java b/validate/sample-yaml-generator/src/test/java/org/onap/cli/sample/yaml/SampleYamlGeneratorTest.java index dc99df02..5a6f3db9 100644 --- a/validate/sample-yaml-generator/src/test/java/org/onap/cli/sample/yaml/SampleYamlGeneratorTest.java +++ b/validate/sample-yaml-generator/src/test/java/org/onap/cli/sample/yaml/SampleYamlGeneratorTest.java @@ -20,19 +20,20 @@ import java.io.IOException; import java.util.Arrays; import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; public class SampleYamlGeneratorTest { @Test public void testGenerateSampleYaml() throws IOException { - SampleYamlGenerator.generateSampleYaml("testcmd", Arrays.asList("-a", "argument"), - "+--------+\n+val +\n+argument+", "test-version-1.0", "target/test.yaml", false, "sample1"); + assertDoesNotThrow(() -> SampleYamlGenerator.generateSampleYaml("testcmd", Arrays.asList("-a", "argument"), + "+--------+\n+val +\n+argument+", "test-version-1.0", "target/test.yaml", false, "sample1")); } @Test public void testGenerateSampleYamlForWriteMultilineKeyValue() throws IOException { - SampleYamlGenerator.generateSampleYaml("testcmd-multiline", Arrays.asList("-a", "argument"), + assertDoesNotThrow(() -> SampleYamlGenerator.generateSampleYaml("testcmd-multiline", Arrays.asList("-a", "argument"), "+--------+\n+testval1 +\n+argument1+\n+testval2 +\n+argument2+", "test-version-1.0", - "target/test-multiline.yaml", true, "sample1"); + "target/test-multiline.yaml", true, "sample1")); } } |