From 03b8ac85fe37aa2c35f28f10cff3d460751b23d0 Mon Sep 17 00:00:00 2001 From: "Nelson,Thomas(tn1381)(arthurdent3)" Date: Wed, 28 Mar 2018 23:15:59 -0400 Subject: Documentation added Change-Id: I5fdf2b042451ea666a36a3ca31fb0783e0239878 Issue-ID: MUSIC-62 Signed-off-by: Nelson,Thomas(tn1381)(arthurdent3) --- .../onap/music/unittests/TestRestMusicData.java | 28 ++++------------------ 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'src/test') diff --git a/src/test/java/org/onap/music/unittests/TestRestMusicData.java b/src/test/java/org/onap/music/unittests/TestRestMusicData.java index e82280f8..b9fd058a 100644 --- a/src/test/java/org/onap/music/unittests/TestRestMusicData.java +++ b/src/test/java/org/onap/music/unittests/TestRestMusicData.java @@ -470,7 +470,6 @@ public class TestRestMusicData { JsonDelete jsonDelete = new JsonDelete(); Map consistencyInfo = new HashMap<>(); MultivaluedMap row = new MultivaluedMapImpl(); - //row.add("emp_name", "test1"); consistencyInfo.put("type", "atomic"); jsonDelete.setConsistencyInfo(consistencyInfo); Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion()); @@ -552,13 +551,6 @@ public class TestRestMusicData { JsonKeySpace jsonKeyspace = new JsonKeySpace(); Map consistencyInfo = new HashMap<>(); Map replicationInfo = new HashMap<>(); -// consistencyInfo.put("type", "eventual"); -// replicationInfo.put("class", "SimpleStrategy"); -// replicationInfo.put("replication_factor", 1); -// jsonKeyspace.setConsistencyInfo(consistencyInfo); -// jsonKeyspace.setDurabilityOfWrites("true"); - // jsonKeyspace.setKeyspaceName("TestApp1"); -// jsonKeyspace.setReplicationInfo(replicationInfo); Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion()); Response response = data.dropKeySpace("1", "1", "1", "abc66ccc-d857-4e90-b1e5-df98a3d40ce6", appName, userId, password, keyspaceName); @@ -583,14 +575,12 @@ public class TestRestMusicData { @Test public void Test6_onboard1() throws Exception { JsonOnboard jsonOnboard = new JsonOnboard(); -// jsonOnboard.setAppname("TestApp2"); jsonOnboard.setIsAAF("false"); jsonOnboard.setUserId("TestUser2"); jsonOnboard.setPassword("TestPassword2"); Map resultMap = (Map) admin.onboardAppWithMusic(jsonOnboard).getEntity(); resultMap.containsKey("success"); System.out.println("--->" + resultMap.toString()); -// onboardUUID = resultMap.get("Generated AID").toString(); assertEquals("Unauthorized: Please check the request parameters. Some of the required values appName(ns), userId, password, isAAF are missing.", resultMap.get("Exception")); } @@ -611,7 +601,6 @@ public class TestRestMusicData { @Test public void Test7_onboardSearch1() throws Exception { JsonOnboard jsonOnboard = new JsonOnboard(); -// jsonOnboard.setAppname("TestApp2"); jsonOnboard.setIsAAF("false"); jsonOnboard.setAid(onboardUUID); Map resultMap = (Map) admin.getOnboardedInfoSearch(jsonOnboard).getEntity(); @@ -641,7 +630,6 @@ public class TestRestMusicData { jsonOnboard.setIsAAF("false"); jsonOnboard.setUserId("TestUser3"); jsonOnboard.setPassword("TestPassword3"); -// jsonOnboard.setAid(onboardUUID); Map resultMap = (Map) admin.updateOnboardApp(jsonOnboard).getEntity(); System.out.println("--->" + resultMap.toString()); resultMap.containsKey("success"); @@ -667,10 +655,6 @@ public class TestRestMusicData { @Test public void Test8_onboardUpdate3() throws Exception { JsonOnboard jsonOnboard = new JsonOnboard(); -// jsonOnboard.setAppname("TestApp2"); -// jsonOnboard.setIsAAF("false"); -// jsonOnboard.setUserId("TestUser3"); -// jsonOnboard.setPassword("TestPassword3"); jsonOnboard.setAid(onboardUUID); Map resultMap = (Map) admin.updateOnboardApp(jsonOnboard).getEntity(); assertTrue(resultMap.containsKey("Exception") ); @@ -689,8 +673,6 @@ public class TestRestMusicData { @Test public void Test9_onboardDelete1() throws Exception { JsonOnboard jsonOnboard = new JsonOnboard(); -// jsonOnboard.setAppname("TestApp2"); -// jsonOnboard.setAid(onboardUUID); Map resultMap = (Map) admin.deleteOnboardApp(jsonOnboard).getEntity(); assertTrue(resultMap.containsKey("Exception")); } @@ -698,7 +680,7 @@ public class TestRestMusicData { @Test public void Test3_createLockReference() throws Exception { Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion()); - Map resultMap = lock.createLockReference(lockName, null, appName, userId, password, http); + Map resultMap = (Map) lock.createLockReference(lockName,"1","1", null, appName, userId, password).getEntity(); @SuppressWarnings("unchecked") Map resultMap1 = (Map) resultMap.get("lock"); lockId = (String) resultMap1.get("lock"); @@ -708,28 +690,28 @@ public class TestRestMusicData { @Test public void Test4_accquireLock() throws Exception { Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion()); - Map resultMap = lock.accquireLock(lockId, null, appName, userId, password, http); + Map resultMap = (Map) lock.accquireLock(lockId,"1","1", null, appName, userId, password).getEntity(); assertEquals(ResultType.SUCCESS, resultMap.get("status")); } @Test public void Test5_currentLockHolder() throws Exception { Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion()); - Map resultMap = lock.currentLockHolder(lockName, null, appName, userId, password, http); + Map resultMap = (Map) lock.currentLockHolder(lockName,"1","1", null, appName, userId, password).getEntity(); assertEquals(ResultType.SUCCESS, resultMap.get("status")); } @Test public void Test7_unLock() throws Exception { Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion()); - Map resultMap = lock.unLock(lockId, null, appName, userId, password, http); + Map resultMap = (Map) lock.unLock(lockId,"1","1", null, appName, userId, password).getEntity(); assertEquals(ResultType.SUCCESS, resultMap.get("status")); } @Test public void Test8_delete() throws Exception { Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion()); - Map resultMap = lock.deleteLock(lockName, null, appName, userId, password, http); + Map resultMap = (Map) lock.deleteLock(lockName,"1","1", null, appName, userId, password).getEntity(); assertEquals(ResultType.SUCCESS, resultMap.get("status")); } } \ No newline at end of file -- cgit 1.2.3-korg