diff options
author | Shiwei Tian <tian.shiwei@zte.com.cn> | 2017-10-23 16:06:41 +0800 |
---|---|---|
committer | Shiwei Tian <tian.shiwei@zte.com.cn> | 2017-10-24 10:01:23 +0800 |
commit | 80aa5b49e5e3fb696231ce66acf198ff50d74731 (patch) | |
tree | 869683ed98ca1abf7050929c5169f34fd6d50353 /holmes-actions/src/test/java/org | |
parent | 75b8b484b7207c393026ee6509a22b2016a22475 (diff) |
modify unique bug
Issue-ID: HOLMES-71
Change-Id: I7b19e161f74c6dd97b6aeb93ae0d0247ce02b91e
Signed-off-by: Shiwei Tian <tian.shiwei@zte.com.cn>
Diffstat (limited to 'holmes-actions/src/test/java/org')
-rw-r--r-- | holmes-actions/src/test/java/org/onap/holmes/common/api/stat/VesAlarmTest.java | 9 | ||||
-rw-r--r-- | holmes-actions/src/test/java/org/onap/holmes/common/dmaap/DmaapServiceTest.java | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/VesAlarmTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/VesAlarmTest.java index c2772e8..f046517 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/VesAlarmTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/VesAlarmTest.java @@ -27,7 +27,8 @@ public class VesAlarmTest { @Test public void hashCodeTest() throws Exception { VesAlarm alarm = new VesAlarm(); - alarm.setVersion(0L); + alarm.setEventName("unique"); + alarm.setSourceId("123"); VesAlarm alarmClone = (VesAlarm)alarm.clone(); assertTrue(alarm.hashCode() == alarmClone.hashCode()); } @@ -35,7 +36,8 @@ public class VesAlarmTest { @Test public void equalsTest() throws Exception { VesAlarm alarm = new VesAlarm(); - alarm.setVersion(0L); + alarm.setEventName("unique"); + alarm.setSourceId("123"); VesAlarm alarmClone = (VesAlarm)alarm.clone(); assertTrue(alarm.equals(alarmClone)); } @@ -44,7 +46,8 @@ public class VesAlarmTest { public void cloneTest() throws Exception { VesAlarm alarm = new VesAlarm(); alarm.setDomain("Test"); - alarm.setVersion(0L); + alarm.setEventName("unique"); + alarm.setSourceId("123"); assertThat(alarm, equalTo(alarm.clone())); } diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/DmaapServiceTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/DmaapServiceTest.java index c9f892b..3f61813 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/DmaapServiceTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/dmaap/DmaapServiceTest.java @@ -72,7 +72,7 @@ public class DmaapServiceTest { assertThat(policyMsg.getTarget(), equalTo("vserver.vserver-name")); assertThat(policyMsg.getTargetType(), equalTo("VM")); - assertThat(policyMsg.getAAI().get("vserver.vserver-name"), equalTo("tetss")); + assertThat(policyMsg.getAai().get("vserver.vserver-name"), equalTo("tetss")); } @Test @@ -189,8 +189,8 @@ public class DmaapServiceTest { PowerMock.verifyAll(); assertThat(actual.getClosedLoopControlName(), equalTo(null)); - assertThat(actual.getAAI().get("vserver.prov-status"), equalTo("prov")); - assertThat(actual.getAAI().get("vserver.vserver-name2") == null, equalTo(true)); - assertThat(actual.getAAI().get("generic-vnf.service-instance-id"), equalTo("")); + assertThat(actual.getAai().get("vserver.prov-status"), equalTo("prov")); + assertThat(actual.getAai().get("vserver.vserver-name2") == null, equalTo(true)); + assertThat(actual.getAai().get("generic-vnf.service-instance-id"), equalTo("")); } }
\ No newline at end of file |