aboutsummaryrefslogtreecommitdiffstats
path: root/models-pap/src/test
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-02-12 16:57:58 +0000
committera.sreekumar <ajith.sreekumar@bell.ca>2021-02-15 17:53:17 +0000
commit59d6c65ea096b5fe169c8f62acc15dd0f3de7cfb (patch)
treef2d148a522dc007cf2787d0be3f1fe0d9249e683 /models-pap/src/test
parent55fc900c3fbed2819b5b8a168dc29c5d583eccf3 (diff)
Updating PAP deployment API to reflect actual status
Change-Id: I1fb0232d2f5fe37e95e87babb233a824212439ff Issue-ID: POLICY-2526 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'models-pap/src/test')
-rw-r--r--models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java
new file mode 100644
index 000000000..178687daa
--- /dev/null
+++ b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021 Bell Canada. 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.models.pap.concepts;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+/**
+ * Test class for PdpGroupDeployResponse.
+ */
+public class PdpGroupDeployResponseTest {
+
+ private static final String URL = "/policy/pap/v1/policies/status";
+ private static final String MESSAGE = "the message";
+
+ @Test
+ public void testPdpGroupDeployResponse() {
+ assertNotNull(new PdpGroupDeployResponse("message", "url"));
+ assertNotNull(new PdpGroupDeployResponse("message", null));
+ assertNotNull(new PdpGroupDeployResponse(null, null));
+
+ PdpGroupDeployResponse resp = new PdpGroupDeployResponse(MESSAGE, URL);
+ assertEquals(MESSAGE, resp.getMessage());
+ assertEquals(URL, resp.getUrl());
+
+ resp = new PdpGroupDeployResponse(null, null);
+ assertNull(resp.getMessage());
+ assertNull(resp.getUrl());
+ }
+}