From d697d828df129afa52555e9381d69c45d526c7d6 Mon Sep 17 00:00:00 2001 From: Parshad Patel Date: Mon, 26 Nov 2018 18:22:40 +0900 Subject: Rename test classes in drools-applications Make test classes name consitence by adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1258 Change-Id: Idea946375ee46f14512d4c4bc29e65adaa4d2b37 Signed-off-by: Parshad Patel --- .../ActorServiceProviderTest.java | 16 +++--- .../actorserviceprovider/DummyActor.java | 60 ++++++++++++++++++++++ .../actorserviceprovider/TestActor.java | 60 ---------------------- ...licy.controlloop.actorserviceprovider.spi.Actor | 2 +- 4 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java delete mode 100644 controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java (limited to 'controlloop/common/actors/actorServiceProvider/src') diff --git a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java index a70216d1e..4e50d855f 100644 --- a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java +++ b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java @@ -38,16 +38,16 @@ public class ActorServiceProviderTest { actorService = ActorService.getInstance(); assertNotNull(actorService); - Actor testActor = ActorService.getInstance().actors().get(0); - assertNotNull(testActor); + Actor dummyActor = ActorService.getInstance().actors().get(0); + assertNotNull(dummyActor); - assertEquals("TestActor", testActor.actor()); + assertEquals("DummyActor", dummyActor.actor()); - assertEquals(2, testActor.recipes().size()); - assertEquals("Dorothy", testActor.recipes().get(0)); - assertEquals("Wizard", testActor.recipes().get(1)); + assertEquals(2, dummyActor.recipes().size()); + assertEquals("Dorothy", dummyActor.recipes().get(0)); + assertEquals("Wizard", dummyActor.recipes().get(1)); - assertEquals(2, testActor.recipeTargets("Dorothy").size()); - assertEquals(2, testActor.recipePayloads("Dorothy").size()); + assertEquals(2, dummyActor.recipeTargets("Dorothy").size()); + assertEquals(2, dummyActor.recipePayloads("Dorothy").size()); } } diff --git a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java new file mode 100644 index 000000000..2e8512411 --- /dev/null +++ b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java @@ -0,0 +1,60 @@ +/*- + * ============LICENSE_START======================================================= + * TestActorServiceProvider + * ================================================================================ + * Copyright (C) 2018 Ericsson. 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. + * 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. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.controlloop.actorserviceprovider; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.policy.controlloop.actorserviceprovider.spi.Actor; + +public class DummyActor implements Actor { + @Override + public String actor() { + return this.getClass().getSimpleName(); + } + + @Override + public List recipes() { + List recipeList = new ArrayList<>(); + recipeList.add("Dorothy"); + recipeList.add("Wizard"); + + return recipeList; + } + + @Override + public List recipeTargets(String recipe) { + List recipeTargetList = new ArrayList<>(); + recipeTargetList.add("Wicked Witch"); + recipeTargetList.add("Wizard of Oz"); + + return recipeTargetList; + } + + @Override + public List recipePayloads(String recipe) { + List recipePayloadList = new ArrayList<>(); + recipePayloadList.add("Dorothy"); + recipePayloadList.add("Toto"); + + return recipePayloadList; + } +} diff --git a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java deleted file mode 100644 index af04cc138..000000000 --- a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java +++ /dev/null @@ -1,60 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * TestActorServiceProvider - * ================================================================================ - * Copyright (C) 2018 Ericsson. 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. - * 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. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.controlloop.actorserviceprovider; - -import java.util.ArrayList; -import java.util.List; - -import org.onap.policy.controlloop.actorserviceprovider.spi.Actor; - -public class TestActor implements Actor { - @Override - public String actor() { - return this.getClass().getSimpleName(); - } - - @Override - public List recipes() { - List recipeList = new ArrayList<>(); - recipeList.add("Dorothy"); - recipeList.add("Wizard"); - - return recipeList; - } - - @Override - public List recipeTargets(String recipe) { - List recipeTargetList = new ArrayList<>(); - recipeTargetList.add("Wicked Witch"); - recipeTargetList.add("Wizard of Oz"); - - return recipeTargetList; - } - - @Override - public List recipePayloads(String recipe) { - List recipePayloadList = new ArrayList<>(); - recipePayloadList.add("Dorothy"); - recipePayloadList.add("Toto"); - - return recipePayloadList; - } -} diff --git a/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor index a15871456..2a4bb5749 100644 --- a/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor +++ b/controlloop/common/actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor @@ -1 +1 @@ -org.onap.policy.controlloop.actorserviceprovider.TestActor \ No newline at end of file +org.onap.policy.controlloop.actorserviceprovider.DummyActor \ No newline at end of file -- cgit 1.2.3-korg