From a90a763fa3c9260c3a5e08440ec99e4438852e77 Mon Sep 17 00:00:00 2001 From: Ram Krishna Verma Date: Thu, 26 Aug 2021 16:22:12 -0400 Subject: Fix sonar issues Issue-ID: POLICY-3077 Change-Id: I480b97984754ec4b69c6cde6481510fbbf62252e Signed-off-by: Ram Krishna Verma --- .../policy/apex/auth/clieditor/CommandLineCommandTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'auth/cli-editor/src/test') diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java index c3789b5e3..7c3e4cb01 100644 --- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java @@ -98,22 +98,22 @@ public class CommandLineCommandTest { assertEquals(0, commandLineCommand.compareTo(commandLineCommand)); CommandLineCommand otherCommand = new CommandLineCommand(); otherCommand.setSystemCommand(true); - assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); + assertThat(commandLineCommand).isNotEqualByComparingTo(otherCommand); otherCommand.getArgumentList().add(new CommandLineArgument("testArgument")); - assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); + assertThat(commandLineCommand).isNotEqualByComparingTo(otherCommand); } @Test public void testCompareKeywordList() { CommandLineCommand otherCommand = new CommandLineCommand(); otherCommand.getKeywordlist().add("test"); - assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); + assertThat(commandLineCommand).isNotEqualByComparingTo(otherCommand); commandLineCommand.getKeywordlist().add("test"); assertEquals(0, commandLineCommand.compareTo(otherCommand)); commandLineCommand.getKeywordlist().add("test2"); - assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); + assertThat(commandLineCommand).isNotEqualByComparingTo(otherCommand); otherCommand.getKeywordlist().add("test3"); - assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); + assertThat(commandLineCommand).isNotEqualByComparingTo(otherCommand); } @Test -- cgit 1.2.3-korg