summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSmokowski, Kevin (ks6305) <kevin.smokowski@att.com>2020-02-19 14:55:39 +0000
committerKevin Smokowski <kevin.smokowski@att.com>2020-02-19 15:59:18 +0000
commita688a2cfd24526348f0510768371fc788670b465 (patch)
treee19a387d15d44367bd607bccfd414b54d22fab70
parent7c2f57f8efc971f1d93a544256c084f52f7c3ed2 (diff)
unit test for MdsalHelper
add testToLowerHyphen to MdsalHelper Issue-ID: CCSDK-2106 Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com> Change-Id: I851c3887d61ec2ce520a7fa187a1b65dc3616e6c
-rwxr-xr-xsli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java b/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
index 50a6bbce2..5f8c4c22c 100755
--- a/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
+++ b/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
@@ -745,4 +745,18 @@ public class MdsalHelperTest extends TestCase {
assertEquals(Uri.getDefaultInstance("http://wiki.onap.org:8080"), result.getUri());
}
+ public void testToLowerHyphen() throws Exception {
+ String camelCase = "HelloWorld";
+ String hypenCase = MdsalHelper.toLowerHyphen(camelCase);
+ assertEquals("hello-world", hypenCase);
+
+ camelCase = "L2SwitchInterfaces";
+ hypenCase = MdsalHelper.toLowerHyphen(camelCase);
+ assertEquals("l2-switch-interfaces", hypenCase);
+
+ camelCase = "ABC";
+ hypenCase = MdsalHelper.toLowerHyphen(camelCase);
+ assertEquals("a-b-c", hypenCase);
+ }
+
}