summaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actor.test
diff options
context:
space:
mode:
authorGao, Chenfei (cg287m) <cgao@research.att.com>2017-06-22 14:48:41 -0400
committerPamela Dragosh <pdragosh@research.att.com>2017-06-29 12:50:23 -0400
commit68377161605e39c8c74ea77d0b504177480788f3 (patch)
treefb0fb8a27178da607866e1850f73ac056e046ee8 /controlloop/common/actors/actor.test
parentf0c29b57e132e6335f0fa7bbad885d403e4c85df (diff)
[POLICY-22] Reorganizing drools-apps
Change-Id: I5f9bb3908f8d55c466dd847ae5e01a424e9ba364 Signed-off-by: Gao, Chenfei (cg287m) <chenfei.gao11@gmail.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/actors/actor.test')
-rw-r--r--controlloop/common/actors/actor.test/pom.xml41
-rw-r--r--controlloop/common/actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/Test.java46
2 files changed, 87 insertions, 0 deletions
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 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.policy.drools-applications</groupId>
+ <artifactId>actors</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>actor.test</artifactId>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.19.1</version>
+ <configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${settings.localRepository}/org/onap/policy/drools-applications/actor.appc/1.1.0-SNAPSHOT/actor.appc-1.1.0-SNAPSHOT.jar</additionalClasspathElement>
+ <additionalClasspathElement>${settings.localRepository}/org/onap/policy/drools-applications/actor.mso/1.1.0-SNAPSHOT/actor.mso-1.1.0-SNAPSHOT.jar</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.policy.drools-applications</groupId>
+ <artifactId>actorServiceProvider</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
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");
+ }
+
+}