diff options
Diffstat (limited to 'aai-resources/src/test/java/org/onap/aai/util/DataConversionHelperTest.java')
-rw-r--r-- | aai-resources/src/test/java/org/onap/aai/util/DataConversionHelperTest.java | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/aai-resources/src/test/java/org/onap/aai/util/DataConversionHelperTest.java b/aai-resources/src/test/java/org/onap/aai/util/DataConversionHelperTest.java deleted file mode 100644 index 3acbf03..0000000 --- a/aai-resources/src/test/java/org/onap/aai/util/DataConversionHelperTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.onap.aai.util; - -import org.junit.Rule; -import org.junit.Test; -import org.powermock.modules.agent.PowerMockAgent; -import org.powermock.modules.junit4.rule.PowerMockRule; - -import static org.junit.Assert.assertEquals; - -public class DataConversionHelperTest { - - @Rule - public PowerMockRule rule = new PowerMockRule(); - - static { - PowerMockAgent.initializeIfNeeded(); - } - - /** - * Test convertIPVersionNumToString with value "4". - */ - @Test - public void testConvertIPVersionNumToString_withNum4(){ - assertEquals(DataConversionHelper.IPVERSION_IPV4, DataConversionHelper.convertIPVersionNumToString("4")); - } - - /** - * Test convertIPVersionNumToString with value "6". - */ - @Test - public void testConvertIPVersionNumToString_withNum6(){ - assertEquals(DataConversionHelper.IPVERSION_IPV6, DataConversionHelper.convertIPVersionNumToString("6")); - } - - /** - * Test convertIPVersionNumToString with a value other than "4" or "6". - */ - @Test - public void testConvertIPVersionNumToString_withAThirdNumber(){ - assertEquals(DataConversionHelper.IPVERSION_UNKNOWN, DataConversionHelper.convertIPVersionNumToString("-1")); - } - - /** - * Test convertIPVersionStringToNum with "v4". - */ - @Test - public void testConvertIPVersionStringToNum_withV4(){ - assertEquals("4", DataConversionHelper.convertIPVersionStringToNum(DataConversionHelper.IPVERSION_IPV4)); - } - - /** - * Test convertIPVersionStringToNum with "v6". - */ - @Test - public void testConvertIPVersionStringToNum_withV6(){ - assertEquals("6", DataConversionHelper.convertIPVersionStringToNum(DataConversionHelper.IPVERSION_IPV6)); - } - - /** - * Test convertIPVersionStringToNum with an illegal version. - */ - @Test - public void testConvertIPVersionStringToNum_withRandomString(){ - assertEquals("0", DataConversionHelper.convertIPVersionStringToNum("test string")); - } - - -} |