From 53fe02c107eae2f45abfee02e5b56a8ab3c09523 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 23 Aug 2021 17:10:00 -0400 Subject: More lombok for apex-pdp Added lombok to auth thru context-management, excluding basic-model and context-model. Issue-ID: POLICY-3391 Change-Id: I1c3a69d52d3bc65a99126ad44126e5a97424c66f Signed-off-by: Jim Hahn --- .../apex/auth/clieditor/CommandLineCommandTest.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 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 15b2b98f3..c3789b5e3 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 @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (c) 2020-2021 Nordix Foundation. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +21,7 @@ package org.onap.policy.apex.auth.clieditor; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertThrows; @@ -47,8 +49,8 @@ public class CommandLineCommandTest { assertEquals("testDescription", commandLineCommand.getDescription()); assertEquals("TestName", commandLineCommand.getName()); assertEquals( - "CLICommand [name=TestName,keywordlist=[], argumentList=[], apiMethod=, systemCommand=true," - + " description=testDescription]", commandLineCommand.toString()); + "CommandLineCommand(name=TestName, keywordlist=[], argumentList=[], apiMethod=, systemCommand=true," + + " description=testDescription)", commandLineCommand.toString()); } @Test(expected = CommandLineException.class) @@ -96,22 +98,22 @@ public class CommandLineCommandTest { assertEquals(0, commandLineCommand.compareTo(commandLineCommand)); CommandLineCommand otherCommand = new CommandLineCommand(); otherCommand.setSystemCommand(true); - assertEquals(6, commandLineCommand.compareTo(otherCommand)); + assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); otherCommand.getArgumentList().add(new CommandLineArgument("testArgument")); - assertEquals(-609496833, commandLineCommand.compareTo(otherCommand)); + assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); } @Test public void testCompareKeywordList() { CommandLineCommand otherCommand = new CommandLineCommand(); otherCommand.getKeywordlist().add("test"); - assertEquals(-1, commandLineCommand.compareTo(otherCommand)); + assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); commandLineCommand.getKeywordlist().add("test"); assertEquals(0, commandLineCommand.compareTo(otherCommand)); commandLineCommand.getKeywordlist().add("test2"); - assertEquals(1, commandLineCommand.compareTo(otherCommand)); + assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); otherCommand.getKeywordlist().add("test3"); - assertEquals(-1, commandLineCommand.compareTo(otherCommand)); + assertThat(commandLineCommand.compareTo(otherCommand)).isNotZero(); } @Test -- cgit 1.2.3-korg