summaryrefslogtreecommitdiffstats
path: root/auth/cli-editor/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'auth/cli-editor/src/test')
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java25
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java1
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java1
6 files changed, 15 insertions, 15 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 020e272dd..5c541e14a 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
@@ -17,12 +17,15 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.auth.clieditor;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
import java.util.List;
-
import org.junit.Before;
import org.junit.Test;
@@ -43,7 +46,9 @@ public class CommandLineCommandTest {
assertTrue(commandLineCommand.isSystemCommand());
assertEquals("testDescription", commandLineCommand.getDescription());
assertEquals("TestName", commandLineCommand.getName());
- assertEquals("CLICommand [name=TestName,keywordlist=[], argumentList=[], apiMethod=, systemCommand=true, description=testDescription]",commandLineCommand.toString());
+ assertEquals(
+ "CLICommand [name=TestName,keywordlist=[], argumentList=[], apiMethod=, systemCommand=true,"
+ + " description=testDescription]", commandLineCommand.toString());
}
@Test(expected = CommandLineException.class)
@@ -72,27 +77,26 @@ public class CommandLineCommandTest {
@Test
public void testValidApiMethodName() {
commandLineCommand.setApiMethod("Java.Get");
- assertEquals("Get",commandLineCommand.getApiMethodName());
+ assertEquals("Get", commandLineCommand.getApiMethodName());
}
@Test
public void testGetHelp() {
List<String> keywordList = commandLineCommand.getKeywordlist();
List<CommandLineArgument> argumentList = commandLineCommand.getArgumentList();
- assertEquals("{}: ",commandLineCommand.getHelp());
+ assertEquals("{}: ", commandLineCommand.getHelp());
keywordList.add("TestKeyword");
argumentList.add(new CommandLineArgument("TestArgument"));
argumentList.add(null);
- assertEquals("TestKeyword {}: \n" +
- " TestArgument: (M) ",commandLineCommand.getHelp());
+ assertEquals("TestKeyword {}: \n" + "\tTestArgument: (M) ", commandLineCommand.getHelp());
}
@Test
public void testCompareTo() {
- assertEquals(0,commandLineCommand.compareTo(commandLineCommand));
+ assertEquals(0, commandLineCommand.compareTo(commandLineCommand));
CommandLineCommand otherCommand = new CommandLineCommand();
otherCommand.setSystemCommand(true);
- assertEquals(6,commandLineCommand.compareTo(otherCommand));
+ assertEquals(6, commandLineCommand.compareTo(otherCommand));
otherCommand.getArgumentList().add(new CommandLineArgument("testArgument"));
assertEquals(-609496833, commandLineCommand.compareTo(otherCommand));
}
@@ -123,10 +127,11 @@ public class CommandLineCommandTest {
@Test
public void testEquals() {
- CommandLineCommand otherCommand = new CommandLineCommand();
assertFalse(commandLineCommand.equals(new Object()));
assertTrue(commandLineCommand.equals(commandLineCommand));
assertFalse(commandLineCommand.equals(null));
+
+ CommandLineCommand otherCommand = new CommandLineCommand();
assertTrue(commandLineCommand.equals(otherCommand));
otherCommand.getKeywordlist().add("TestKeyword");
assertFalse(commandLineCommand.equals(otherCommand));
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java
index 8cbc1698f..d00a9232b 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java
@@ -27,7 +27,6 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
-
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java
index a5362a8f1..509a57cf8 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorOptionsTest.java
@@ -29,7 +29,6 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
import org.onap.policy.common.utils.resources.TextFileUtils;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java
index 21f1e1969..f82453b95 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/ContextAlbumsTest.java
@@ -27,7 +27,6 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.net.URL;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
index f458a9fb9..44bdc798a 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
@@ -28,7 +28,6 @@ import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Paths;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
index 8f6f193c1..caaa12925 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
@@ -25,7 +25,6 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.net.URL;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;