summaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actor.test
diff options
context:
space:
mode:
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");
+ }
+
+}