aboutsummaryrefslogtreecommitdiffstats
path: root/integration-tests
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests')
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/validation/pmdictionary/CsarValidationTest.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/validation/pmdictionary/CsarValidationTest.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/validation/pmdictionary/CsarValidationTest.java
index 9500c9b378..7a4ad4da1e 100644
--- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/validation/pmdictionary/CsarValidationTest.java
+++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/validation/pmdictionary/CsarValidationTest.java
@@ -39,6 +39,8 @@ import org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.csar.validatio
import org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.csar.validation.ValidatorFactory;
class CsarValidationTest {
+
+ private final ValidatorFactory validatorFactory = new ValidatorFactory();
@Test
void shouldNotReturnErrors_whenPnfCsarIsValid() throws OnboardPackageException, IOException {
@@ -46,7 +48,7 @@ class CsarValidationTest {
FileContentHandler pnfFileContent = CsarLoader.load("validPnfCompliantWithSOL004.csar", "/Files/PNFs/validation/pmdictionary/validPnfCompliantWithSOL004.csar");
//when
- final ValidationResult validationResult = ValidatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
+ final ValidationResult validationResult = validatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
//then
assertThat(validationResult.getErrors(), is(empty()));
@@ -59,7 +61,7 @@ class CsarValidationTest {
FileContentHandler pnfFileContent = CsarLoader.load("invalidPnfCompliantWithSOL004.csar", "/Files/PNFs/validation/pmdictionary/invalidPnfCompliantWithSOL004.csar");
//when
- final ValidationResult validationResult = ValidatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
+ final ValidationResult validationResult = validatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
List<ErrorMessage> errorList = validationResult.getErrors();
//then
@@ -77,7 +79,7 @@ class CsarValidationTest {
);
//when
- final ValidationResult validationResult = ValidatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
+ final ValidationResult validationResult = validatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
//then
assertThat(validationResult.isValid(), is(true));
@@ -94,7 +96,7 @@ class CsarValidationTest {
);
//when
- final ValidationResult validationResult = ValidatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
+ final ValidationResult validationResult = validatorFactory.getValidator(pnfFileContent).validate(pnfFileContent);
List<ErrorMessage> errorList = validationResult.getErrors();
//then