aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/rest
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/model-impl/rest')
-rw-r--r--controlloop/common/model-impl/rest/pom.xml48
-rwxr-xr-xcontrolloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java102
-rwxr-xr-xcontrolloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java84
-rwxr-xr-xcontrolloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java84
4 files changed, 159 insertions, 159 deletions
diff --git a/controlloop/common/model-impl/rest/pom.xml b/controlloop/common/model-impl/rest/pom.xml
index 2e1303eae..06fd30da7 100644
--- a/controlloop/common/model-impl/rest/pom.xml
+++ b/controlloop/common/model-impl/rest/pom.xml
@@ -21,32 +21,32 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <artifactId>rest</artifactId>
+ <parent>
+ <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <artifactId>model-impl</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
- <parent>
- <groupId>org.onap.policy.drools-applications</groupId>
- <artifactId>model-impl</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
+ <artifactId>rest</artifactId>
<dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.5</version>
- <scope>provided</scope>
- </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5.5</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java
index 96dec30db..0bf1da8d5 100755
--- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java
+++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java
@@ -1,52 +1,52 @@
-/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * 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.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestGet {
-
- @Test(expected = NullPointerException.class)
- public void testUrlNull() {
- RESTManager mgr = new RESTManager();
- mgr.get(null, "user", null, null);
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testUsernameNull() {
- RESTManager mgr = new RESTManager();
- mgr.get("nothing", null, null, null);
- }
-
- @Test
- public void testUrlExampleOrg() {
- RESTManager mgr = new RESTManager();
-
- Pair<Integer, String> result = mgr.get("http://www.example.org", "user", null, null);
- assertEquals((Integer)200, result.a);
- assertTrue(result.b != null);
- assertTrue(result.b.length() > 0);
- }
+/*-
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ *
+ * ================================================================================
+ * 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.rest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.rest.RESTManager.Pair;
+
+public class TestGet {
+
+ @Test(expected = NullPointerException.class)
+ public void testUrlNull() {
+ RESTManager mgr = new RESTManager();
+ mgr.get(null, "user", null, null);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testUsernameNull() {
+ RESTManager mgr = new RESTManager();
+ mgr.get("nothing", null, null, null);
+ }
+
+ @Test
+ public void testUrlExampleOrg() {
+ RESTManager mgr = new RESTManager();
+
+ Pair<Integer, String> result = mgr.get("http://www.example.org", "user", null, null);
+ assertEquals((Integer)200, result.a);
+ assertTrue(result.b != null);
+ assertTrue(result.b.length() > 0);
+ }
} \ No newline at end of file
diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java
index 3ada0a74e..aea5a7387 100755
--- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java
+++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java
@@ -1,42 +1,42 @@
-/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * 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.rest;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestPair {
-
- @Test
- public void testPair() {
- RESTManager mgr = new RESTManager();
-
- Pair<Integer, Integer> pii = mgr.new Pair<>(1, 2);
- assertEquals((Integer) 1, (Integer) pii.a);
- assertEquals((Integer) 2, (Integer) pii.b);
-
- Pair<Integer, String> pis = mgr.new Pair<>(1, "test");
- assertEquals((Integer) 1, (Integer) pis.a);
- assertEquals("test", pis.b);
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ *
+ * ================================================================================
+ * 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.rest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.policy.rest.RESTManager.Pair;
+
+public class TestPair {
+
+ @Test
+ public void testPair() {
+ RESTManager mgr = new RESTManager();
+
+ Pair<Integer, Integer> pii = mgr.new Pair<>(1, 2);
+ assertEquals((Integer) 1, (Integer) pii.a);
+ assertEquals((Integer) 2, (Integer) pii.b);
+
+ Pair<Integer, String> pis = mgr.new Pair<>(1, "test");
+ assertEquals((Integer) 1, (Integer) pis.a);
+ assertEquals("test", pis.b);
+ }
+}
diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java
index 40f1b3089..1cdde22e8 100755
--- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java
+++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java
@@ -1,42 +1,42 @@
-/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * 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.rest;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestPost {
-
- @Test(expected = IllegalArgumentException.class)
- public void testUsernameNull() {
- RESTManager mgr = new RESTManager();
- mgr.post("nothing", null, null, null, null, null);
- }
-
- @Test
- public void testBodyNull() {
- RESTManager mgr = new RESTManager();
- Pair<Integer, String> result = mgr.post("http://www.example.org", "user", null, null, null, null);
- assertEquals(null, result);
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ *
+ * ================================================================================
+ * 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.rest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.policy.rest.RESTManager.Pair;
+
+public class TestPost {
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testUsernameNull() {
+ RESTManager mgr = new RESTManager();
+ mgr.post("nothing", null, null, null, null, null);
+ }
+
+ @Test
+ public void testBodyNull() {
+ RESTManager mgr = new RESTManager();
+ Pair<Integer, String> result = mgr.post("http://www.example.org", "user", null, null, null, null);
+ assertEquals(null, result);
+ }
+}