diff options
Diffstat (limited to 'main/src/test/java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java | 14 | ||||
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/comm/PdpRequestsTest.java | 22 |
2 files changed, 0 insertions, 36 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java index 199ebcf1..a92ff95b 100644 --- a/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java @@ -293,8 +293,6 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { public void testDisablePdp() { map.addRequest(update); - when(requests.getLastGroupName()).thenReturn(MY_GROUP); - // indicate failure invokeFailureHandler(1); @@ -316,8 +314,6 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { map.addRequest(change); map.stopPublishing(PDP1); - when(requests.getLastGroupName()).thenReturn(MY_GROUP); - invokeFailureHandler(1); // should not have stopped publishing a second time @@ -338,8 +334,6 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { public void testRemoveFromGroup() throws Exception { map.addRequest(change); - when(requests.getLastGroupName()).thenReturn(MY_GROUP); - PdpGroup group = makeGroup(MY_GROUP, MY_VERSION); group.setPdpSubgroups(Arrays.asList(makeSubGroup(MY_SUBGROUP + "a", PDP1 + "a"), makeSubGroup(MY_SUBGROUP, PDP1), makeSubGroup(MY_SUBGROUP + "c", PDP1 + "c"))); @@ -364,8 +358,6 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { public void testRemoveFromGroup_DaoEx() throws Exception { map.addRequest(change); - when(requests.getLastGroupName()).thenReturn(MY_GROUP); - when(dao.getFilteredPdpGroups(any())).thenThrow(new PfModelException(Status.BAD_REQUEST, "expected exception")); invokeFailureHandler(1); @@ -382,8 +374,6 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { public void testRemoveFromGroup_NoGroups() throws Exception { map.addRequest(change); - when(requests.getLastGroupName()).thenReturn(MY_GROUP); - invokeFailureHandler(1); verify(dao, never()).updatePdpGroups(any()); @@ -393,8 +383,6 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { public void testRemoveFromGroup_NoMatchingSubgroup() throws Exception { map.addRequest(change); - when(requests.getLastGroupName()).thenReturn(MY_GROUP); - PdpGroup group = makeGroup(MY_GROUP, MY_VERSION); group.setPdpSubgroups(Arrays.asList(makeSubGroup(MY_SUBGROUP, DIFFERENT))); @@ -409,8 +397,6 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { public void testRemoveFromSubgroup() throws Exception { map.addRequest(change); - when(requests.getLastGroupName()).thenReturn(MY_GROUP); - PdpGroup group = makeGroup(MY_GROUP, MY_VERSION); group.setPdpSubgroups(Arrays.asList(makeSubGroup(MY_SUBGROUP, PDP1, PDP1 + "x", PDP1 + "y"))); diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/PdpRequestsTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/PdpRequestsTest.java index e219c1d5..1bf73225 100644 --- a/main/src/test/java/org/onap/policy/pap/main/comm/PdpRequestsTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/comm/PdpRequestsTest.java @@ -23,7 +23,6 @@ package org.onap.policy.pap.main.comm; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; import static org.mockito.Mockito.never; @@ -60,27 +59,6 @@ public class PdpRequestsTest extends CommonRequestBase { } @Test - public void testRecordGroup_testGetLatestGroupXxx() { - assertNull(data.getLastGroupName()); - - data.addSingleton(update); - assertEquals(MY_GROUP, data.getLastGroupName()); - - UpdateReq req = makeUpdateReq(PDP1, MY_GROUP, MY_SUBGROUP); - req.getMessage().setPdpGroup(DIFFERENT); - data.addSingleton(req); - assertEquals(DIFFERENT, data.getLastGroupName()); - - // doesn't record info from other message types - StateChangeReq req2 = change; - req2.getMessage().setPdpGroup(MY_GROUP); - data.addSingleton(req2); - - // should be unchanged - assertEquals(DIFFERENT, data.getLastGroupName()); - } - - @Test public void testAddSingleton() { data.addSingleton(update); |