summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/errors/NicInternalNetworkErrorBuilderTest.java30
1 files changed, 28 insertions, 2 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/errors/NicInternalNetworkErrorBuilderTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/errors/NicInternalNetworkErrorBuilderTest.java
index d8644a5cd6..d4d1431a0c 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/errors/NicInternalNetworkErrorBuilderTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/errors/NicInternalNetworkErrorBuilderTest.java
@@ -30,13 +30,39 @@ public class NicInternalNetworkErrorBuilderTest {
@Test
public void testGetNetworkDescriptionInternalNetworkErrorBuilder() {
- //when
+ // when
ErrorCode errorCode = NicInternalNetworkErrorBuilder.getNetworkDescriptionInternalNetworkErrorBuilder();
- //then
+ // then
assertEquals(VendorSoftwareProductErrorCodes.NETWORK_DESCRIPTION_NOT_ALLOWED_FOR_INTERNAL_NETWORK,
errorCode.id());
assertEquals(ErrorCategory.APPLICATION, errorCode.category());
assertEquals("Invalid request, Network Description not allowed for Internal Networks", errorCode.message());
}
+
+ @Test
+ public void testGetNicNullNetworkIdInternalNetworkIdErrorBuilder() {
+ // when
+ ErrorCode errorCode = NicInternalNetworkErrorBuilder.getNicNullNetworkIdInternalNetworkIdErrorBuilder();
+
+ // then
+ assertEquals(VendorSoftwareProductErrorCodes.NULL_NETWORKID_NOT_ALLOWED, errorCode.id());
+ assertEquals(ErrorCategory.APPLICATION, errorCode.category());
+ assertEquals("Internal Networks are currently not supported for VSP created Manually,"
+ + " so please fix all the NIC to be of Type External and re-submit the VSP.",
+ errorCode.message());
+
+ }
+
+ @Test
+ public void testGetNetworkTypeErrorBuilder() {
+ // when
+ ErrorCode errorCode = NicInternalNetworkErrorBuilder.getNetworkTypeErrorBuilder();
+
+ // then
+ assertEquals(VendorSoftwareProductErrorCodes.NETWORK_TYPE_UPDATE_NOT_ALLOWED, errorCode.id());
+ assertEquals(ErrorCategory.APPLICATION, errorCode.category());
+ assertEquals("Invalid request, Network Type Update not allowed for a Nic", errorCode.message());
+
+ }
}