summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'csarvalidation/src/test/java')
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java25
1 files changed, 22 insertions, 3 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java
index d08e00c..a3112ce 100644
--- a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java
@@ -67,7 +67,7 @@ public class VTPValidateCSARR01123IntegrationTest {
}
@Test
- public void shouldReportThatFileIsNotPresentInSources() throws Exception {
+ public void shouldReportThatFileAvailableInCsarIsNotPresentInManifestSources() throws Exception {
// given
configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-option1-invalid-noFileInManifest.csar", "vtp-validate-csar-r01123.yaml", IS_PNF);
@@ -89,6 +89,25 @@ public class VTPValidateCSARR01123IntegrationTest {
}
@Test
+ public void shouldReportThatFilePresentInManifestIsNotPresentInCsarFile() throws Exception {
+ // given
+ configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-option1-invalid-missing-files.csar", "vtp-validate-csar-r01123.yaml", IS_PNF);
+
+ // when
+ testCase.execute();
+
+ Condition<String> containingMissingFiles = new HamcrestCondition<>(allOf(
+ containsString("Definitions/a.yaml"),
+ containsString("Definitions/b.yaml")
+ ));
+
+ // then
+ List<CSARArchive.CSARError> errors = testCase.getErrors();
+ assertThat(errors.size()).isEqualTo(1);
+ assertThat(convertToMessagesList(errors)).haveExactly(1, containingMissingFiles);
+ }
+
+ @Test
public void shouldReportThatVendorNameIsMissingAndThatFileIsNotPresentInSource() throws Exception {
// given
configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-option1-invalid-noVendor-noFileInManifest.csar", "vtp-validate-csar-r01123.yaml", IS_PNF);
@@ -120,7 +139,7 @@ public class VTPValidateCSARR01123IntegrationTest {
// then
List<CSARArchive.CSARError> errors = testCase.getErrors();
- assertThat(errors.size()).isEqualTo(0);
+ assertThat(errors.size()).isZero();
}
@Test
@@ -133,7 +152,7 @@ public class VTPValidateCSARR01123IntegrationTest {
// then
List<CSARArchive.CSARError> errors = testCase.getErrors();
- assertThat(errors.size()).isEqualTo(0);
+ assertThat(errors.size()).isZero();
}
@Test