2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Modifications Copyright (C) 2019 Samsung
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.policy.test;
25 import java.util.UUID;
27 import org.onap.policy.api.PushPolicyParameters;
28 import static org.junit.Assert.*;
31 * The class <code>PushPolicyParametersTest</code> contains tests for the class
32 * <code>{@link PushPolicyParameters}</code>.
34 * @generatedBy CodePro at 6/1/16 1:40 PM
35 * @version $Revision: 1.0 $
37 public class PushPolicyParametersTest {
39 * Run the PushPolicyParameters() constructor test.
43 * @generatedBy CodePro at 6/1/16 1:40 PM
46 public void testPushPolicyParameters_1() throws Exception {
48 PushPolicyParameters result = new PushPolicyParameters();
50 // add additional test code here
51 assertNotNull(result);
52 assertEquals(null, result.getPolicyName());
53 assertEquals(null, result.getRequestID());
54 assertEquals(null, result.getPolicyType());
55 assertEquals(null, result.getPdpGroup());
59 * Run the PushPolicyParameters(String,String,String,UUID) constructor test.
63 * @generatedBy CodePro at 6/1/16 1:40 PM
66 public void testPushPolicyParameters_2() throws Exception {
67 String policyName = "";
68 String policyType = "";
70 UUID requestID = UUID.randomUUID();
72 PushPolicyParameters result =
73 new PushPolicyParameters(policyName, policyType, pdpGroup, requestID);
75 // add additional test code here
76 assertNotNull(result);
77 assertEquals("", result.getPolicyName());
78 assertEquals("", result.getPolicyType());
79 assertEquals("", result.getPdpGroup());
83 * Run the String getPdpGroup() method test.
87 * @generatedBy CodePro at 6/1/16 1:40 PM
90 public void testGetPdpGroup_1() throws Exception {
91 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
93 String result = fixture.getPdpGroup();
95 // add additional test code here
96 assertEquals("", result);
100 * Run the String getPolicyName() method test.
104 * @generatedBy CodePro at 6/1/16 1:40 PM
107 public void testGetPolicyName_1() throws Exception {
108 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
110 String result = fixture.getPolicyName();
112 // add additional test code here
113 assertEquals("", result);
117 * Run the String getPolicyType() method test.
121 * @generatedBy CodePro at 6/1/16 1:40 PM
124 public void testGetPolicyType_1() throws Exception {
125 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
127 String result = fixture.getPolicyType();
129 // add additional test code here
130 assertEquals("", result);
134 * Run the UUID getRequestID() method test.
138 * @generatedBy CodePro at 6/1/16 1:40 PM
141 public void testGetRequestID() throws Exception {
142 PushPolicyParameters fixture = new PushPolicyParameters("", "", "",
143 UUID.fromString("d1dbaac1-0944-4f07-9ce7-733c697537ea"));
145 UUID result = fixture.getRequestID();
147 // add additional test code here
148 assertNotNull(result);
149 assertEquals("d1dbaac1-0944-4f07-9ce7-733c697537ea", result.toString());
150 assertEquals(4, result.version());
151 assertEquals(2, result.variant());
152 assertEquals(-7140611980868110358L, result.getLeastSignificantBits());
153 assertEquals(-3324876153822097657L, result.getMostSignificantBits());
157 * Run the void setPdpGroup(String) method test.
161 * @generatedBy CodePro at 6/1/16 1:40 PM
164 public void testSetPdpGroup_1() throws Exception {
165 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
166 String pdpGroup = "";
168 fixture.setPdpGroup(pdpGroup);
170 // add additional test code here
174 * Run the void setPolicyName(String) method test.
178 * @generatedBy CodePro at 6/1/16 1:40 PM
181 public void testSetPolicyName_1() throws Exception {
182 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
183 String policyName = "";
185 fixture.setPolicyName(policyName);
187 // add additional test code here
191 * Run the void setPolicyType(String) method test.
195 * @generatedBy CodePro at 6/1/16 1:40 PM
198 public void testSetPolicyType_1() throws Exception {
199 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
200 String policyType = "";
202 fixture.setPolicyType(policyType);
204 // add additional test code here
208 * Run the void setRequestID(UUID) method test.
212 * @generatedBy CodePro at 6/1/16 1:40 PM
215 public void testSetRequestID_1() throws Exception {
216 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
217 UUID requestID = UUID.randomUUID();
219 fixture.setRequestID(requestID);
221 // add additional test code here
225 * Perform pre-test initialization.
227 * @throws Exception if the initialization fails for some reason
229 * @generatedBy CodePro at 6/1/16 1:40 PM
232 public void setUp() throws Exception {
233 // add additional set up code here
237 * Perform post-test clean-up.
239 * @throws Exception if the clean-up fails for some reason
241 * @generatedBy CodePro at 6/1/16 1:40 PM
244 public void tearDown() throws Exception {
245 // Add additional tear down code here
251 * @param args the command line arguments
253 * @generatedBy CodePro at 6/1/16 1:40 PM
255 public static void main(String[] args) {
256 new org.junit.runner.JUnitCore().run(PushPolicyParametersTest.class);