summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/test/java
diff options
context:
space:
mode:
authorshrikantawachar <shrikant.awachar@amdocs.com>2017-10-13 19:57:30 +0530
committershrikantawachar <shrikant.awachar@amdocs.com>2017-10-13 19:57:35 +0530
commit15a6fa057331a2060b9446426cf91a99294e41a1 (patch)
tree632f701fdcc3c61baad136eec6bea3226b38fb47 /openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/test/java
parentc4c4e2869573534bbf8154ff4b5aad3a87126c33 (diff)
Refactoring of module in onboarding
Removed ATT modules. Change-Id: I9f97b92a1f80483c3422b9b5e6643fdad1bb881d Issue-ID: SDC-456 Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/test/java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/test/java/com/att/sdc/validation/impl/validators/AttValetGroupAssignmentResourceValidatorTest.java59
1 files changed, 0 insertions, 59 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/test/java/com/att/sdc/validation/impl/validators/AttValetGroupAssignmentResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/test/java/com/att/sdc/validation/impl/validators/AttValetGroupAssignmentResourceValidatorTest.java
deleted file mode 100644
index acb54f4140..0000000000
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/test/java/com/att/sdc/validation/impl/validators/AttValetGroupAssignmentResourceValidatorTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.att.sdc.validation.impl.validators;
-
-import com.att.sdc.validation.datatypes.AttHeatResourceTypes;
-import org.openecomp.core.validation.api.ValidationManager;
-import org.openecomp.core.validation.factory.ValidationManagerFactory;
-import org.openecomp.core.validation.types.GlobalValidationContext;
-import org.openecomp.core.validation.types.MessageContainer;
-import org.openecomp.sdc.datatypes.error.ErrorLevel;
-import org.openecomp.sdc.datatypes.error.ErrorMessage;
-import org.openecomp.sdc.validation.impl.validators.HeatResourceValidator;
-import org.openecomp.sdc.validation.util.ValidationTestUtil;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-
-public class AttValetGroupAssignmentResourceValidatorTest {
-
- HeatResourceValidator baseValidator = new HeatResourceValidator();
- AttValetGroupAssignmentResourceValidator resourceValidator = new
- AttValetGroupAssignmentResourceValidator();
-
- @Test
- public void testATTValetGroupType() {
- Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
- resourceValidator, AttHeatResourceTypes.ATT_VALET_GROUP_ASSIGNMENT.getType(),
- "/com/att/sdc/validation/impl/validators/att_heat_validator/att_valet_group_type/positive");
- Assert.assertNotNull(messages);
- Assert.assertEquals(messages.size(), 0);
-
- messages = ValidationTestUtil.testValidator(baseValidator,
- resourceValidator, AttHeatResourceTypes.ATT_VALET_GROUP_ASSIGNMENT.getType(),
- "/com/att/sdc/validation/impl/validators/att_heat_validator/att_valet_group_type/negative");
- Assert.assertNotNull(messages);
- Assert.assertEquals(messages.size(), 1);
- Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2);
- Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
- "WARNING: Unexpected group_type for ATT::Valet::GroupAssignment, Resource ID [valet_group_assignment_illegal_1]");
- Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
- "WARNING: Unexpected group_type for ATT::Valet::GroupAssignment, Resource ID [valet_group_assignment_illegal_2]");
- }
-
- @Test
- public void testValidationWithFullFlowFromValidationFactory() throws IOException {
- GlobalValidationContext globalContext = ValidationTestUtil.createGlobalContextFromPath(
- "/com/att/sdc/validation/impl/validators/att_heat_validator/att_valet_group_type/negative");
- ValidationManager validationManager = ValidationManagerFactory.getInstance().createInterface();
- validationManager.updateGlobalContext(globalContext);
- Map<String, List<ErrorMessage>> messages = validationManager.validate();
-
- Assert.assertNotNull(messages);
- ErrorMessage excpectedMessage = new ErrorMessage(ErrorLevel.WARNING,
- "WARNING: Unexpected group_type for ATT::Valet::GroupAssignment, Resource ID [valet_group_assignment_illegal_1]");
- Assert.assertTrue(messages.get("first.yaml").contains(excpectedMessage));
- }
-} \ No newline at end of file