From 68377161605e39c8c74ea77d0b504177480788f3 Mon Sep 17 00:00:00 2001 From: "Gao, Chenfei (cg287m)" Date: Thu, 22 Jun 2017 14:48:41 -0400 Subject: [POLICY-22] Reorganizing drools-apps Change-Id: I5f9bb3908f8d55c466dd847ae5e01a424e9ba364 Signed-off-by: Gao, Chenfei (cg287m) Signed-off-by: Pamela Dragosh --- controlloop/common/actors/actor.test/pom.xml | 41 +++++++++++++++++++ .../onap/policy/controlloop/actor/test/Test.java | 46 ++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 controlloop/common/actors/actor.test/pom.xml create mode 100644 controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java (limited to 'controlloop/common/actors/actor.test') diff --git a/controlloop/common/actors/actor.test/pom.xml b/controlloop/common/actors/actor.test/pom.xml new file mode 100644 index 000000000..9d8ffa48d --- /dev/null +++ b/controlloop/common/actors/actor.test/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + org.onap.policy.drools-applications + actors + 1.1.0-SNAPSHOT + + actor.test + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + + ${settings.localRepository}/org/onap/policy/drools-applications/actor.appc/1.1.0-SNAPSHOT/actor.appc-1.1.0-SNAPSHOT.jar + ${settings.localRepository}/org/onap/policy/drools-applications/actor.mso/1.1.0-SNAPSHOT/actor.mso-1.1.0-SNAPSHOT.jar + + + + + + + + org.onap.policy.drools-applications + actorServiceProvider + 1.1.0-SNAPSHOT + provided + + + junit + junit + 4.12 + provided + + + diff --git a/controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java b/controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java new file mode 100644 index 000000000..f6eba49af --- /dev/null +++ b/controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java @@ -0,0 +1,46 @@ +/*- + * ============LICENSE_START======================================================= + * actor test + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. 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.actor.test; + +import static org.junit.Assert.*; + +import org.onap.policy.controlloop.actorServiceProvider.ActorService; +import org.onap.policy.controlloop.actorServiceProvider.spi.Actor; + +public class Test { + + @org.junit.Test + public void test() { + System.out.println("Dumping actors"); + ActorService actorService = ActorService.getInstance(); + assertNotNull(actorService); + int num = 0; + for (Actor actor : actorService.actors()) { + System.out.println(actor.actor()); + for (String recipe : actor.recipes()) { + System.out.println("\t" + recipe + " " + actor.recipeTargets(recipe) + " " + actor.recipePayloads(recipe)); + } + num++; + } + System.out.println("Found " + num + " actors"); + } + +} -- cgit 1.2.3-korg