summaryrefslogtreecommitdiffstats
path: root/context/context-management/src/test/java
diff options
context:
space:
mode:
authorDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-11 17:17:34 +0100
committerDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-11 17:32:25 +0100
commit15dcabb76fd31f54452a94498e84516485dd838a (patch)
tree509c78c1dd92c1d825e530cb93da001fb65755e3 /context/context-management/src/test/java
parent4f0e4e0acb23479d705747cf6015d4d820659c78 (diff)
Checkstyle the context-management package
Change-Id: Ifc4fef920681f21b0a965ea55d9bb78785ec66f9 Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com> Issue-ID: POLICY-1034
Diffstat (limited to 'context/context-management/src/test/java')
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/ContextExceptionTest.java10
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java11
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java11
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java1
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java5
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java1
6 files changed, 23 insertions, 16 deletions
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/ContextExceptionTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/ContextExceptionTest.java
index 15560f7cc..07960ba85 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/ContextExceptionTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/ContextExceptionTest.java
@@ -17,6 +17,7 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context;
import static org.junit.Assert.assertEquals;
@@ -30,12 +31,15 @@ public class ContextExceptionTest {
@Test
public void testContextException() {
assertEquals("context exception message", new ContextException("context exception message").getMessage());
- assertEquals("context exception message", new ContextException("context exception message", new IOException()).getMessage());
+ assertEquals("context exception message",
+ new ContextException("context exception message", new IOException()).getMessage());
}
@Test
public void testContextRuntimeException() {
- assertEquals("context exception message", new ContextRuntimeException("context exception message").getMessage());
- assertEquals("context exception message", new ContextRuntimeException("context exception message", new IOException()).getMessage());
+ assertEquals("context exception message",
+ new ContextRuntimeException("context exception message").getMessage());
+ assertEquals("context exception message",
+ new ContextRuntimeException("context exception message", new IOException()).getMessage());
}
}
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
index e5cc61fad..bed678581 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
@@ -93,8 +93,8 @@ public class ContextAlbumImplTest {
new ContextAlbumImpl(new AxContextAlbum(), new JVMLocalDistributor(), new LinkedHashMap<String, Object>());
fail("this test should throw an exception");
} catch (ApexRuntimeException e) {
- assertEquals("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas not found in model service",
- e.getMessage());
+ assertEquals("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas "
+ + "not found in model service", e.getMessage());
} catch (ContextException e) {
fail("this test should throw an ApexRuntimeException");
}
@@ -112,7 +112,7 @@ public class ContextAlbumImplTest {
true, AxArtifactKey.getNullKey());
AxContextAlbum axContextAlbumRO = new AxContextAlbum(new AxArtifactKey("TestContextAlbum", "0.0.1"), "Policy",
- false, simpleStringSchema.getKey());
+ false, simpleStringSchema.getKey());
try {
new ContextAlbumImpl(axContextAlbum, new JVMLocalDistributor(), new LinkedHashMap<String, Object>());
@@ -195,8 +195,9 @@ public class ContextAlbumImplTest {
albumRO.remove("AllKey0");
fail("test should throw an exception");
} catch (ContextRuntimeException e) {
- assertEquals("album \"TestContextAlbum:0.0.1\" remove() not allowed on read only albums for key=\"AllKey0\"",
- e.getMessage());
+ assertEquals(
+ "album \"TestContextAlbum:0.0.1\" remove() not allowed on read only albums for key=\"AllKey0\"",
+ e.getMessage());
}
try {
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
index 17e5deecf..ea29bd87d 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
@@ -35,6 +35,7 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
/**
+ * JavaSchemaHelperInstanceCreationTest.
* @author Liam Fallon (liam.fallon@ericsson.com)
* @version
*/
@@ -73,9 +74,8 @@ public class JavaSchemaHelperInstanceCreationTest {
schemaHelper0.createNewInstance();
fail("this test should throw an exception here");
} catch (final Exception e) {
- assertEquals(
- "AvroTest:0.0.1: could not create an instance of class \"java.lang.Boolean\" using the default constructor \"Boolean()\"",
- e.getMessage());
+ assertEquals("AvroTest:0.0.1: could not create an instance of class \"java.lang.Boolean\" using the default"
+ + " constructor \"Boolean()\"", e.getMessage());
}
assertEquals(true, schemaHelper0.createNewInstance("true"));
@@ -84,9 +84,8 @@ public class JavaSchemaHelperInstanceCreationTest {
schemaHelper1.createNewInstance();
fail("this test should throw an exception here");
} catch (final Exception e) {
- assertEquals(
- "AvroTest:0.0.1: could not create an instance of class \"java.lang.Long\" using the default constructor \"Long()\"",
- e.getMessage());
+ assertEquals("AvroTest:0.0.1: could not create an instance of class \"java.lang.Long\" using the default "
+ + "constructor \"Long()\"", e.getMessage());
}
assertEquals(65536L, schemaHelper1.createNewInstance("65536"));
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java
index a7446303e..ade5eba87 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java
@@ -17,6 +17,7 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.impl.schema.java;
import static org.junit.Assert.assertEquals;
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java
index a27c64fff..6dd6e2527 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java
@@ -17,15 +17,16 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.impl.schema.java;
public class MyBaseClass {
final String stringField;
-
+
public MyBaseClass(final String stringField) {
this.stringField = stringField;
}
-
+
public String getStringField() {
return stringField;
}
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java
index 2f837a379..f68bcf4dc 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java
@@ -17,6 +17,7 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.context.impl.schema.java;
public class MySubClass extends MyBaseClass {