aboutsummaryrefslogtreecommitdiffstats
path: root/auth/cli-editor/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-08-23 17:10:00 -0400
committerJim Hahn <jrh3@att.com>2021-08-24 09:22:38 -0400
commit53fe02c107eae2f45abfee02e5b56a8ab3c09523 (patch)
tree35c9646b7c629485f6241ed1b48b853305e585ac /auth/cli-editor/src/test/java
parentc3d0b33c9facf49e37e9ab58412227ff44c66363 (diff)
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 <jrh3@att.com>
Diffstat (limited to 'auth/cli-editor/src/test/java')
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java16
1 files changed, 9 insertions, 7 deletions
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