From def0f11148b1fb0d97d4bfa16fc2224de0af7115 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 13 Feb 2018 11:29:56 +0000 Subject: Rename maven modules to mirror directory structure The naming of Maven modules in drools-applications was not aligned with the directory structure in the git repository of drools-applications. Therefore it was difficult to see the strucutre of the repository in Eclipse and other IDEs. This change amends the Maven module IDs to reflect the repository directory structure. This patch reset fixes the previos patch set, where many references to maven modules internally in drools-applciations were missed. See also changes in engine and docker repos. Updated to reflect repo directory structure in maven artifact groups. Issue-ID: POLICY-238 Change-Id: I8ab1a7ecdb664045222bbbfda269135e3e449109 Signed-off-by: liamfallon --- controlloop/common/model-impl/rest/pom.xml | 48 +++++----- .../test/java/org/onap/policy/rest/TestGet.java | 102 ++++++++++----------- .../test/java/org/onap/policy/rest/TestPair.java | 84 ++++++++--------- .../test/java/org/onap/policy/rest/TestPost.java | 84 ++++++++--------- 4 files changed, 159 insertions(+), 159 deletions(-) (limited to 'controlloop/common/model-impl/rest') 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 @@ 4.0.0 - rest + + org.onap.policy.drools-applications.controlloop.common.model-impl + model-impl + 1.2.0-SNAPSHOT + - - org.onap.policy.drools-applications - model-impl - 1.2.0-SNAPSHOT - + rest - - junit - junit - 4.12 - test - - - com.google.code.gson - gson - 2.5 - provided - - - org.apache.httpcomponents - httpclient - 4.5.5 - provided - + + junit + junit + 4.12 + test + + + com.google.code.gson + gson + 2.5 + provided + + + org.apache.httpcomponents + httpclient + 4.5.5 + provided + 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 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 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 pii = mgr.new Pair<>(1, 2); - assertEquals((Integer) 1, (Integer) pii.a); - assertEquals((Integer) 2, (Integer) pii.b); - - Pair 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 pii = mgr.new Pair<>(1, 2); + assertEquals((Integer) 1, (Integer) pii.a); + assertEquals((Integer) 2, (Integer) pii.b); + + Pair 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 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 result = mgr.post("http://www.example.org", "user", null, null, null, null); + assertEquals(null, result); + } +} -- cgit 1.2.3-korg