aboutsummaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorDan Timoney <dt5972@att.com>2018-09-20 18:03:05 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-20 18:03:05 +0000
commitc376c4a219140456bcbe148e9f15261e3b7b3c78 (patch)
tree64cc794573186812fca07b4683e5305a1fb1911a /ms
parentc17527a33c187ab9fb8fdb00f4aded060bdccd0e (diff)
parent52f5180942137e82080c9cda7cbe16011985fe79 (diff)
Merge "added test case to TestVlangtagApiServiceImpl"
Diffstat (limited to 'ms')
-rw-r--r--ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java
index 4655d3d1..18aa3024 100644
--- a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java
+++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java
@@ -1,5 +1,6 @@
/*******************************************************************************
* Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +17,7 @@
package org.onap.ccsdk.apps.ms.vlantagapi.core.service;
+import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import java.util.ArrayList;
import java.util.List;
@@ -82,6 +84,22 @@ private static final Logger log = LoggerFactory.getLogger(TestVlantagApiServiceI
Mockito.doReturn(peResponses).when(policyEngineSpy).getConfigUsingPost(any());
}
+ @Test
+ public void testAssignVlanTagForNullRequest() throws Exception
+ {
+ AssignVlanTagResponse response = service.assignVlanTag(null);
+ Integer expectedErrorCode=500;
+ assertEquals(expectedErrorCode, response.getErrorCode());
+ }
+
+ @Test
+ public void testUnAssignVlanTagForNullRequest() throws Exception
+ {
+ UnassignVlanTagResponse response = service.unassignVlanTag(null);
+ Integer expectedErrorCode=500;
+ assertEquals(expectedErrorCode, response.getErrorCode());
+ }
+
@Test(expected = Test.None.class /* no exception expected */)
public void test_assign_sucess_001() throws Exception {