diff options
author | 2020-06-13 16:51:20 +0800 | |
---|---|---|
committer | 2020-06-13 16:51:20 +0800 | |
commit | b6bcfbcc8b7445a953b4d5963dc4ff93028362c5 (patch) | |
tree | e850fe74efb0f180b65b1cf087736f89660c3407 /holmes-actions/src/test | |
parent | aa96befb67370641ba50b745ce3408dedaee90c8 (diff) |
Fixed Bugs Detected by SonarCloud
Change-Id: Iaa0a6ce8c8aa4b88d59aad882f31135acf89cc26
Issue-ID: HOLMES-316
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'holmes-actions/src/test')
-rw-r--r-- | holmes-actions/src/test/java/org/onap/holmes/common/api/stat/AlarmTest.java | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/AlarmTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/AlarmTest.java index d701f3d..6cf62d6 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/AlarmTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/api/stat/AlarmTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2020 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,7 @@ package org.onap.holmes.common.api.stat; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.google.gson.Gson; -import com.google.gson.reflect.TypeToken; + import java.util.Date; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertFalse; @@ -53,20 +52,6 @@ public class AlarmTest { } @Test - public void testCompareLinkPosition_isEmpty() throws Exception { - final Map<Integer, Integer> otherIdIdx = new HashMap<>(); - assertThat(999, equalTo(alarm.CompareLinkPosition(otherIdIdx))); - } - - @Test - public void testCompareLinkPosition_TempLinkId() throws Exception { - final Map<Integer, Integer> otherIdIdx = new HashMap<>(); - otherIdIdx.put(1, 2); - alarm.addLinkIdNodeIdx(1, 3); - assertThat(1, equalTo(alarm.CompareLinkPosition(otherIdIdx))); - } - - @Test public void testContainNode_NoContainLink() throws Exception { alarm.addLinkIdNodeIdx(1, 2); assertThat(false, equalTo(alarm.containNode(2, 2))); |