summaryrefslogtreecommitdiffstats
path: root/client/client-editor/src/test
diff options
context:
space:
mode:
authorDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-13 11:20:21 +0100
committerDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-14 12:27:52 +0100
commit933af17963b47650fe9864d03e63a06aa08e31a9 (patch)
tree96525e225a4637b1a97fe4931811ba8f6c5d0bd8 /client/client-editor/src/test
parent15dcabb76fd31f54452a94498e84516485dd838a (diff)
Fix checkstyle warnings in the client module
Change-Id: I3263a833cc9dd6d86afdf2ae53de0e53c92850c9 Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com> Issue-ID: POLICY-1034
Diffstat (limited to 'client/client-editor/src/test')
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorRestResource.java64
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorStartup.java60
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestExceptions.java1
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/BeanFake.java8
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/TestBeans.java1
5 files changed, 86 insertions, 48 deletions
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorRestResource.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorRestResource.java
index ee156e02b..1fb3a0a00 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorRestResource.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorRestResource.java
@@ -37,6 +37,7 @@ import org.onap.policy.apex.model.modelapi.ApexAPIResult.RESULT;
import org.onap.policy.apex.model.utilities.TextFileUtils;
/**
+ * Test Apex Editor Rest Resource.
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestApexEditorRestResource extends JerseyTest {
@@ -537,7 +538,8 @@ public class TestApexEditorRestResource extends JerseyTest {
entityString = "{" + "\"name\" : \"HowsItGoing\"," + "\"version\" : \"0.0.2\","
+ "\"namespace\" : \"somewhere.over.the.rainbow\"," + "\"source\" : \"beginning\","
+ "\"target\" : \"end\","
- + "\"parameters\" : {\"Par0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", \"localName\" : \"Par0\", \"optional\" : false}},"
+ + "\"parameters\" : {\"Par0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
+ + "\"localName\" : \"Par0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -556,7 +558,8 @@ public class TestApexEditorRestResource extends JerseyTest {
entityString = "{" + "\"name\" : \"GoodDay\"," + "\"version\" : \"0.0.2\","
+ "\"namespace\" : \"somewhere.over.the.rainbow\"," + "\"source\" : \"beginning\","
+ "\"target\" : \"end\","
- + "\"parameters\" : {\"Par0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"Par0\", \"optional\" : false}},"
+ + "\"parameters\" : {\"Par0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+ + "\"localName\" : \"Par0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -725,7 +728,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.SUCCESS, result.getResult());
entityString = "{" + "\"name\" : \"HowsItGoing\"," + "\"version\" : \"0.0.2\","
- + "\"inputFields\" : {\"IField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", \"localName\" : \"IField0\", \"optional\" : false}},"
+ + "\"inputFields\" : {\"IField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
+ + "\"localName\" : \"IField0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -741,7 +745,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
entityString = "{" + "\"name\" : \"GoodDay\"," + "\"version\" : \"0.0.2\","
- + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"IField0\", \"optional\" : false}},"
+ + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+ + "\"localName\" : \"IField0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -749,7 +754,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, result.getResult());
entityString = "{" + "\"name\" : \"Howdy\"," + "\"version\" : \"0.0.2\","
- + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"NotIField0\", \"optional\" : false}},"
+ + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+ + "\"localName\" : \"NotIField0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -757,7 +763,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
entityString = "{" + "\"name\" : \"HowsItGoing2\"," + "\"version\" : \"0.0.2\","
- + "\"outputFields\" : {\"OField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", \"localName\" : \"OField0\", \"optional\" : false}},"
+ + "\"outputFields\" : {\"OField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
+ + "\"localName\" : \"OField0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -773,7 +780,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
entityString = "{" + "\"name\" : \"GoodDay2\"," + "\"version\" : \"0.0.2\","
- + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"OField0\", \"optional\" : false}},"
+ + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\","
+ + " \"localName\" : \"OField0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -781,7 +789,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, result.getResult());
entityString = "{" + "\"name\" : \"Howdy2\"," + "\"version\" : \"0.0.2\","
- + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"NotOField0\", \"optional\" : false}},"
+ + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+ + "\"localName\" : \"NotOField0\", \"optional\" : false}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -789,8 +798,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
entityString = "{" + "\"name\" : \"HowsItGoing3\"," + "\"version\" : \"0.0.2\","
- + "\"taskLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ + "\"taskLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons,"
+ + " lots of lime\"}," + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
result = target("editor/" + sessionId + "/Task/Create").request().post(entity, ApexAPIResult.class);
@@ -806,8 +815,8 @@ public class TestApexEditorRestResource extends JerseyTest {
entityString = "{" + "\"name\" : \"GoodDay3\"," + "\"version\" : \"0.0.2\","
+ "\"namespace\" : \"somewhere.over.the.rainbow\"," + "\"source\" : \"beginning\","
+ "\"target\" : \"end\","
- + "\"taskLogic\" : {\"logicFlavour\" : \"UNDEFINED\", \"logic\" : \"lots of lemons, lots of lime\"},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ + "\"taskLogic\" : {\"logicFlavour\" : \"UNDEFINED\", \"logic\" : \"lots of lemons,"
+ + " lots of lime\"}," + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
result = target("editor/" + sessionId + "/Task/Create").request().post(entity, ApexAPIResult.class);
@@ -822,7 +831,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
entityString = "{" + "\"name\" : \"HowsItGoing4\"," + "\"version\" : \"0.0.2\","
- + "\"parameters\" : {\"Par0\" : {\"parameterName\" : \"Par0\", \"defaultValue\" : \"Parameter Defaultvalue\"}},"
+ + "\"parameters\" : {\"Par0\" : {\"parameterName\" : \"Par0\", "
+ + "\"defaultValue\" : \"Parameter Defaultvalue\"}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -838,7 +848,8 @@ public class TestApexEditorRestResource extends JerseyTest {
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
entityString = "{" + "\"name\" : \"GoodDay4\"," + "\"version\" : \"0.0.2\","
- + "\"parameters\" : {\"Par0\" : {\"parameterName\" : \"NotPar0\", \"defaultValue\" : \"Parameter Defaultvalue\"}},"
+ + "\"parameters\" : {\"Par0\" : {\"parameterName\" : \"NotPar0\", \"defaultValue\" : "
+ + "\"Parameter Defaultvalue\"}},"
+ "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -1223,8 +1234,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"name\" : \"state\","
+ " \"trigger\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"defaultTask\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
- + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
- + " \"stateOutputs\" : {" + " \"so0\" : {"
+ + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"}," + " \"stateOutputs\" : {" + " \"so0\" : {"
+ " \"event\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"nextState\" : null" + " }" + " }," + " \"tasks\" : {"
+ " \"tr0\" : {"
@@ -1261,7 +1272,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"name\" : \"state\","
+ " \"trigger\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"defaultTask\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
- + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+ + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"},"
+ " \"contexts\" : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
+ " \"stateOutputs\" : {" + " \"so0\" : {"
+ " \"event\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1281,7 +1293,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"name\" : \"state\","
+ " \"trigger\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"defaultTask\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
- + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+ + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"},"
+ " \"contexts\" : [{\"name\" : \"IDontExist\", \"version\" : \"0.0.1\"}],"
+ " \"stateOutputs\" : {" + " \"so0\" : {"
+ " \"event\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1301,7 +1314,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"name\" : \"state\","
+ " \"trigger\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"defaultTask\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
- + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+ + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"},"
+ " \"contexts\" : [null]," + " \"stateOutputs\" : {" + " \"so0\" : {"
+ " \"event\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"nextState\" : null" + " }" + " }," + " \"tasks\" : {"
@@ -1320,7 +1334,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"name\" : \"state\","
+ " \"trigger\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"defaultTask\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
- + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+ + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"},"
+ " \"contexts\" : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
+ " \"stateOutputs\" : {" + " \"so0\" : {"
+ " \"event\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1329,7 +1344,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"task\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
+ " \"outputType\" : \"DIRECT\"," + " \"outputName\" : \"so0\"" + " }" + " },"
+ " \"finalizers\" : {"
- + " \"sf0\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"}"
+ + " \"sf0\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"}"
+ " }" + " }" + "}," + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002671\","
+ "\"description\" : \"A description of hello\"" + "}";
entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -1342,7 +1358,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"name\" : \"state\","
+ " \"trigger\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"defaultTask\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
- + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+ + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"},"
+ " \"contexts\" : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
+ " \"stateOutputs\" : {" + " \"so0\" : {"
+ " \"event\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1363,7 +1380,8 @@ public class TestApexEditorRestResource extends JerseyTest {
+ " \"name\" : \"state\","
+ " \"trigger\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
+ " \"defaultTask\" : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
- + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+ + " \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+ + "lots of lime\"},"
+ " \"contexts\" : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
+ " \"stateOutputs\" : {" + " \"so0\" : {"
+ " \"event\" : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorStartup.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorStartup.java
index d61d43b01..699505aa8 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorStartup.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorStartup.java
@@ -31,7 +31,7 @@ import org.junit.Test;
import org.onap.policy.apex.client.editor.rest.ApexEditorMain.EditorState;
/**
- * The Class TestApexEditorStartup.
+ * Test Apex Editor Startup.
*/
public class TestApexEditorStartup {
// CHECKSTYLE:OFF: MagicNumber
@@ -54,7 +54,8 @@ public class TestApexEditorStartup {
+ "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=-1sec], "
+ "State=RUNNING) started at http://localhost:18989/apexservices/"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=-1sec], State=STOPPED) shut down "));
+ + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=-1sec],"
+ + " State=STOPPED) shut down "));
}
/**
@@ -71,8 +72,9 @@ public class TestApexEditorStartup {
runEditor(args);
fail("test should throw an exception here");
} catch (final Exception e) {
- assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[null], State=STOPPED) parameter error, too many command line arguments specified : [12321]"));
+ assertTrue(e.getLocalizedMessage().startsWith(
+ "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+ + " too many command line arguments specified : [12321]"));
}
}
@@ -90,8 +92,9 @@ public class TestApexEditorStartup {
runEditor(args);
fail("test should throw an exception here");
} catch (final Exception e) {
- assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[null], State=STOPPED) parameter error, too many command line arguments specified : [12321 12322 12323]"));
+ assertTrue(e.getLocalizedMessage().startsWith(
+ "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+ + " too many command line arguments specified : [12321 12322 12323]"));
}
}
@@ -109,8 +112,9 @@ public class TestApexEditorStartup {
runEditor(args);
fail("test should throw an exception here");
} catch (final Exception e) {
- assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[null], State=STOPPED) parameter error, invalid command line arguments specified : Unrecognized option: -z"));
+ assertTrue(e.getLocalizedMessage().startsWith(
+ "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+ + " invalid command line arguments specified : Unrecognized option: -z"));
}
}
@@ -128,8 +132,9 @@ public class TestApexEditorStartup {
runEditor(args);
fail("test should throw an exception here");
} catch (final Exception e) {
- assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[null], State=STOPPED) parameter error, invalid command line arguments specified : Unrecognized option: --hello"));
+ assertTrue(e.getLocalizedMessage().startsWith(
+ "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+ + " invalid command line arguments specified : Unrecognized option: --hello"));
}
}
@@ -213,7 +218,8 @@ public class TestApexEditorStartup {
+ "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], "
+ "State=RUNNING) started at http://localhost:12321/apexservices/"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], State=STOPPED) shut down "));
+ + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec],"
+ + " State=STOPPED) shut down "));
}
/**
@@ -235,7 +241,8 @@ public class TestApexEditorStartup {
+ "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], "
+ "State=RUNNING) started at http://localhost:12321/apexservices/"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("(ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], State=STOPPED) shut down "));
+ + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec],"
+ + " State=STOPPED) shut down "));
}
@@ -253,8 +260,9 @@ public class TestApexEditorStartup {
runEditor(args);
fail("test should throw an exception here");
} catch (final Exception e) {
- assertTrue(e.getMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[null], State=STOPPED) parameter error, error parsing argument \"port\" :For input string: \" 12321\""));
+ assertTrue(e.getMessage().startsWith(
+ "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+ + " error parsing argument \"port\" :For input string: \" 12321\""));
}
}
@@ -337,9 +345,11 @@ public class TestApexEditorStartup {
+ "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], "
+ "State=READY) starting at http://localhost:18989/apexservices/"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING) started"));
+ + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING)"
+ + " started"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+ + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED)"
+ + " shut down "));
}
/**
@@ -358,9 +368,11 @@ public class TestApexEditorStartup {
+ "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], "
+ "State=READY) starting at http://localhost:18989/apexservices/"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING) started"));
+ + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING)"
+ + " started"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+ + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED)"
+ + " shut down "));
}
/**
@@ -379,9 +391,11 @@ public class TestApexEditorStartup {
+ "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], "
+ "State=READY) starting at http://localhost:12321/apexservices/"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=RUNNING) started"));
+ + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=RUNNING)"
+ + " started"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+ + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=STOPPED)"
+ + " shut down "));
}
@@ -401,9 +415,11 @@ public class TestApexEditorStartup {
+ "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], "
+ "State=READY) starting at http://127.0.0.1:12321/apexservices/"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=RUNNING) started"));
+ + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=RUNNING)"
+ + " started"));
assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
- + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+ + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=STOPPED)"
+ + " shut down "));
}
/**
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestExceptions.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestExceptions.java
index c60fb8f4c..e63fb9e45 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestExceptions.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestExceptions.java
@@ -27,6 +27,7 @@ import java.io.IOException;
import org.junit.Test;
/**
+ * Test Apex Editor Exceptions.
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestExceptions {
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/BeanFake.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/BeanFake.java
index 5648e306f..c166dc267 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/BeanFake.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/BeanFake.java
@@ -27,9 +27,11 @@ import javax.xml.bind.annotation.XmlType;
*/
@XmlType
public class BeanFake extends BeanBase {
-
- private String name = null, version = null, field1 = null;
- private int field2 = 0, field3 = 0;
+ private String name = null;
+ private String version = null;
+ private String field1 = null;
+ private int field2 = 0;
+ private int field3 = 0;
public String getName() {
field1 = name;
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/TestBeans.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/TestBeans.java
index 50d330bf8..df08dbaf2 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/TestBeans.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/TestBeans.java
@@ -27,6 +27,7 @@ import static org.junit.Assert.fail;
import org.junit.Test;
/**
+ * Test the beans.
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestBeans {