2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.test;
23 import java.util.UUID;
26 import org.onap.policy.api.PushPolicyParameters;
28 import static org.junit.Assert.*;
31 * The class <code>PushPolicyParametersTest</code> contains tests for the class <code>{@link PushPolicyParameters}</code>.
33 * @generatedBy CodePro at 6/1/16 1:40 PM
34 * @version $Revision: 1.0 $
36 public class PushPolicyParametersTest {
38 * Run the PushPolicyParameters() constructor test.
42 * @generatedBy CodePro at 6/1/16 1:40 PM
45 public void testPushPolicyParameters_1()
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()
68 String policyName = "";
69 String policyType = "";
71 UUID requestID = UUID.randomUUID();
73 PushPolicyParameters result = 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()
92 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
94 String result = fixture.getPdpGroup();
96 // add additional test code here
97 assertEquals("", result);
101 * Run the String getPolicyName() method test.
105 * @generatedBy CodePro at 6/1/16 1:40 PM
108 public void testGetPolicyName_1()
110 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
112 String result = fixture.getPolicyName();
114 // add additional test code here
115 assertEquals("", result);
119 * Run the String getPolicyType() method test.
123 * @generatedBy CodePro at 6/1/16 1:40 PM
126 public void testGetPolicyType_1()
128 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
130 String result = fixture.getPolicyType();
132 // add additional test code here
133 assertEquals("", result);
137 * Run the UUID getRequestID() method test.
141 * @generatedBy CodePro at 6/1/16 1:40 PM
144 public void testGetRequestID()
146 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.fromString("d1dbaac1-0944-4f07-9ce7-733c697537ea"));
148 UUID result = fixture.getRequestID();
150 // add additional test code here
151 assertNotNull(result);
152 assertEquals("d1dbaac1-0944-4f07-9ce7-733c697537ea", result.toString());
153 assertEquals(4, result.version());
154 assertEquals(2, result.variant());
155 assertEquals(-7140611980868110358L, result.getLeastSignificantBits());
156 assertEquals(-3324876153822097657L, result.getMostSignificantBits());
160 * Run the void setPdpGroup(String) method test.
164 * @generatedBy CodePro at 6/1/16 1:40 PM
167 public void testSetPdpGroup_1()
169 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
170 String pdpGroup = "";
172 fixture.setPdpGroup(pdpGroup);
174 // add additional test code here
178 * Run the void setPolicyName(String) method test.
182 * @generatedBy CodePro at 6/1/16 1:40 PM
185 public void testSetPolicyName_1()
187 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
188 String policyName = "";
190 fixture.setPolicyName(policyName);
192 // add additional test code here
196 * Run the void setPolicyType(String) method test.
200 * @generatedBy CodePro at 6/1/16 1:40 PM
203 public void testSetPolicyType_1()
205 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
206 String policyType = "";
208 fixture.setPolicyType(policyType);
210 // add additional test code here
214 * Run the void setRequestID(UUID) method test.
218 * @generatedBy CodePro at 6/1/16 1:40 PM
221 public void testSetRequestID_1()
223 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
224 UUID requestID = UUID.randomUUID();
226 fixture.setRequestID(requestID);
228 // add additional test code here
232 * Perform pre-test initialization.
235 * if the initialization fails for some reason
237 * @generatedBy CodePro at 6/1/16 1:40 PM
242 // add additional set up code here
246 * Perform post-test clean-up.
249 * if the clean-up fails for some reason
251 * @generatedBy CodePro at 6/1/16 1:40 PM
254 public void tearDown()
256 // Add additional tear down code here
262 * @param args the command line arguments
264 * @generatedBy CodePro at 6/1/16 1:40 PM
266 public static void main(String[] args) {
267 new org.junit.runner.JUnitCore().run(PushPolicyParametersTest.class);