diff options
Diffstat (limited to 'core')
6 files changed, 19 insertions, 24 deletions
diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java index 168ab1d78..dbe2fa3c8 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java @@ -25,7 +25,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import org.junit.After; import org.junit.Before; @@ -71,7 +70,7 @@ public class EnFieldTest { assertThatThrownBy(() -> new EnField(axField, null)) .hasMessage("schema helper cannot be created for parameter with key \"Parent:0.0.1:MyParent:My" - + "Field\" with schema \"AxArtifactKey:(name=FieldSchema,version=0.0.1)\""); + + "Field\" with schema \"AxArtifactKey:(name=FieldSchema,version=0.0.1)\""); AxContextSchema schema = new AxContextSchema(fieldSchemaKey, "Java", "java.lang.Integer"); ModelService.getModel(AxContextSchemas.class).getSchemasMap().put(fieldSchemaKey, schema); EnField field = new EnField(axField, 123); @@ -81,11 +80,11 @@ public class EnFieldTest { assertEquals(fieldKey, field.getKey()); assertEquals("MyField", field.getName()); assertEquals("org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelper", - field.getSchemaHelper().getClass().getName()); + field.getSchemaHelper().getClass().getName()); assertEquals(123, field.getAssignableValue()); assertEquals("EnField [axField=AxField:(key=AxReferenceKey:(parentKeyName=Parent,parentKeyVersion=0.0.1," - + "parentLocalName=MyParent,localName=MyField),fieldSchemaKey=AxArtifactKey:" - + "(name=FieldSchema,version=0.0.1),optional=false), value=123]", field.toString()); + + "parentLocalName=MyParent,localName=MyField),fieldSchemaKey=AxArtifactKey:" + + "(name=FieldSchema,version=0.0.1),optional=false), value=123]", field.toString()); assertTrue(field.isAssignableValue()); field = new EnField(axField, "Hello"); diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java index bc8d5e5c1..3d15a8c01 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java @@ -1,34 +1,33 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ package org.onap.policy.apex.core.protocols; -import org.onap.policy.apex.core.protocols.Action; - /** * Dummy action for testing. */ public class DummyAction implements Action { private static final long serialVersionUID = 9178856761163651594L; - - private String actionString = "An Action String"; + + private String actionString = "An Action String"; public DummyAction(final String actionString) { this.actionString = actionString; @@ -59,15 +58,15 @@ public class DummyAction implements Action { if (this == obj) { return true; } - + if (obj == null) { return false; } - + if (getClass() != obj.getClass()) { return false; } - + DummyAction other = (DummyAction) obj; if (actionString == null) { if (other.actionString != null) { diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java index aeeb43dda..5e32c00e4 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java @@ -1,26 +1,26 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ package org.onap.policy.apex.core.protocols; -import org.onap.policy.apex.core.protocols.Message; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; /** @@ -33,7 +33,7 @@ public class DummyMessage extends Message { public DummyMessage(final Action action, final AxArtifactKey targetKey) { super(action, targetKey); } - + public DummyMessage(final Action action, final AxArtifactKey targetKey, final String messageData) { super(action, targetKey, messageData); } diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java index 9c73be559..e6f1fa74a 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java @@ -34,7 +34,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; */ public class SupportMessageTester { - @SuppressWarnings("unlikely-arg-type") @Test public void testMessage() { assertNotNull(new DummyMessage(new DummyAction(null), new AxArtifactKey())); @@ -43,7 +42,7 @@ public class SupportMessageTester { DummyMessage dummyMessage = new DummyMessage(new DummyAction(null), new AxArtifactKey("Target:0.0.1")); assertEquals(new DummyAction(null), dummyMessage.getAction()); assertEquals("Message [action=org.onap.policy.apex.core.protocols.DummyAction@1f, " - + "targetKey=AxArtifactKey:(name=Target,version=0.0.1), data=null]", dummyMessage.toString()); + + "targetKey=AxArtifactKey:(name=Target,version=0.0.1), data=null]", dummyMessage.toString()); dummyMessage.setMessageData("Message Data"); assertEquals("Message Data", dummyMessage.getMessageData()); diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java index ffaf07a00..2ed8ef607 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java @@ -47,7 +47,6 @@ public class ResponseTest { * * @throws UnknownHostException the unknown host exception */ - @SuppressWarnings("unlikely-arg-type") @Test public void testResponse() throws UnknownHostException { final AxArtifactKey responseKey = new AxArtifactKey("ResponseTest", "0.0.1"); diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java index b2822ba93..85feda6d8 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java @@ -49,7 +49,6 @@ public class UpdateModelTest { * * @throws UnknownHostException the unknown host exception */ - @SuppressWarnings("unlikely-arg-type") @Test public void testRegisterEntity() throws UnknownHostException { assertNotNull(new UpdateModel(new AxArtifactKey())); |