From b7431be81e01554b21a94c2e7c1b1a527c329845 Mon Sep 17 00:00:00 2001 From: "Tschaen, Brendan" Date: Sun, 2 Jun 2019 13:56:14 -0400 Subject: Increase MusicUtil Code Coverage Change-Id: I99bdec64d00a3822e4f40ed75b496c591b070057 Issue-ID: MUSIC-405 Signed-off-by: Tschaen, Brendan --- .../org/onap/music/unittests/MusicUtilTest.java | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) (limited to 'src/test') diff --git a/src/test/java/org/onap/music/unittests/MusicUtilTest.java b/src/test/java/org/onap/music/unittests/MusicUtilTest.java index 21b943f0..2b6e0f5a 100644 --- a/src/test/java/org/onap/music/unittests/MusicUtilTest.java +++ b/src/test/java/org/onap/music/unittests/MusicUtilTest.java @@ -180,4 +180,118 @@ public class MusicUtilTest { assertFalse(MusicUtil.isValidConsistency("TEST")); } + @Test + public void testLockUsing() { + MusicUtil.setLockUsing("testlock"); + assertEquals("testlock", MusicUtil.getLockUsing()); + } + + @Test + public void testAAFAdminUrl() { + MusicUtil.setAafAdminUrl("aafAdminURL.com"); + assertEquals("aafAdminURL.com", MusicUtil.getAafAdminUrl()); + } + + @Test + public void testAAFEndpointUrl() { + MusicUtil.setAafEndpointUrl("aafEndpointURL.com"); + assertEquals("aafEndpointURL.com", MusicUtil.getAafEndpointUrl()); + } + + @Test + public void testNamespace() { + MusicUtil.setMusicNamespace("musicNamespace"); + assertEquals("musicNamespace", MusicUtil.getMusicNamespace()); + } + + @Test + public void testAAFRole() { + MusicUtil.setAdminAafRole("aafRole"); + assertEquals("aafRole", MusicUtil.getAdminAafRole()); + } + + @Test + public void testAdminId() { + MusicUtil.setAdminId("adminId"); + assertEquals("adminId", MusicUtil.getAdminId()); + } + + @Test + public void testAdminPass() { + MusicUtil.setAdminPass("pass"); + assertEquals("pass", MusicUtil.getAdminPass()); + } + + @Test + public void testCassaPort() { + MusicUtil.setCassandraPort(1234); + assertEquals(1234, MusicUtil.getCassandraPort()); + } + + @Test + public void testBuild() { + MusicUtil.setBuild("testbuild"); + assertEquals("testbuild", MusicUtil.getBuild()); + } + + @Test + public void testNotifyInterval() { + MusicUtil.setNotifyInterval(123); + assertEquals(123, MusicUtil.getNotifyInterval()); + } + + @Test + public void testNotifyTimeout() { + MusicUtil.setNotifyTimeOut(789); + assertEquals(789, MusicUtil.getNotifyTimeout()); + } + + @Test + public void testTransId() { + MusicUtil.setTransIdPrefix("prefix"); + assertEquals("prefix-", MusicUtil.getTransIdPrefix()); + } + + + @Test + public void testConversationIdPrefix() { + MusicUtil.setConversationIdPrefix("prefix-"); + assertEquals("prefix-", MusicUtil.getConversationIdPrefix()); + } + + @Test + public void testClientIdPrefix() { + MusicUtil.setClientIdPrefix("clientIdPrefix"); + assertEquals("clientIdPrefix-", MusicUtil.getClientIdPrefix()); + } + + @Test + public void testMessageIdPrefix() { + MusicUtil.setMessageIdPrefix("clientIdPrefix"); + assertEquals("clientIdPrefix-", MusicUtil.getMessageIdPrefix()); + } + + @Test + public void testTransIdPrefix() { + MusicUtil.setTransIdPrefix("transIdPrefix"); + assertEquals("transIdPrefix-", MusicUtil.getTransIdPrefix()); + } + + @Test + public void testconvIdReq() { + MusicUtil.setConversationIdRequired("conversationIdRequired"); + assertEquals("conversationIdRequired", MusicUtil.getConversationIdRequired()); + } + + @Test + public void testClientIdRequired() { + MusicUtil.setClientIdRequired("conversationIdRequired"); + assertEquals("conversationIdRequired", MusicUtil.getClientIdRequired()); + } + + @Test + public void testMessageIdRequired() { + MusicUtil.setMessageIdRequired("msgIdRequired"); + assertEquals("msgIdRequired", MusicUtil.getMessageIdRequired()); + } } -- cgit 1.2.3-korg