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.openecomp.policy.test;
23 import java.util.Hashtable;
25 import java.util.UUID;
28 import org.openecomp.policy.api.DecisionRequestParameters;
30 import static org.junit.Assert.*;
33 * The class <code>DecisionRequestParametersTest</code> contains tests for the class <code>{@link DecisionRequestParameters}</code>.
35 * @generatedBy CodePro at 6/1/16 1:41 PM
36 * @version $Revision: 1.0 $
38 public class DecisionRequestParametersTest {
40 * Run the DecisionRequestParameters() constructor test.
44 * @generatedBy CodePro at 6/1/16 1:41 PM
47 public void testDecisionRequestParameters_1()
50 DecisionRequestParameters result = new DecisionRequestParameters();
52 // add additional test code here
53 assertNotNull(result);
54 assertEquals(null, result.getECOMPComponentName());
55 assertEquals(null, result.getDecisionAttributes());
56 assertEquals(null, result.getRequestID());
60 * Run the DecisionRequestParameters(String,Map<String,String>,UUID) constructor test.
64 * @generatedBy CodePro at 6/1/16 1:41 PM
67 public void testDecisionRequestParameters_2()
69 String eCOMPComponentName = "";
70 Map<String, String> decisionAttributes = new Hashtable<String, String>();
71 UUID requestID = UUID.randomUUID();
73 DecisionRequestParameters result = new DecisionRequestParameters(eCOMPComponentName, decisionAttributes, requestID);
75 // add additional test code here
76 assertNotNull(result);
77 assertEquals("", result.getECOMPComponentName());
81 * Run the Map<String, String> getDecisionAttributes() method test.
85 * @generatedBy CodePro at 6/1/16 1:41 PM
88 public void testGetDecisionAttributes_1()
90 DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
92 Map<String, String> result = fixture.getDecisionAttributes();
94 // add additional test code here
95 assertNotNull(result);
96 assertEquals(0, result.size());
100 * Run the String getECOMPComponentName() method test.
104 * @generatedBy CodePro at 6/1/16 1:41 PM
107 public void testGetECOMPComponentName_1()
109 DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
111 String result = fixture.getECOMPComponentName();
113 // add additional test code here
114 assertEquals("", result);
118 * Run the UUID getRequestID() method test.
122 * @generatedBy CodePro at 6/1/16 1:41 PM
125 public void testGetRequestID_1()
127 DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.fromString("d1db6a6d-7140-4864-8200-6b541261fdd2"));
129 UUID result = fixture.getRequestID();
131 // add additional test code here
132 assertNotNull(result);
133 assertEquals("d1db6a6d-7140-4864-8200-6b541261fdd2", result.toString());
134 assertEquals(4, result.version());
135 assertEquals(2, result.variant());
136 assertEquals(-9079138839949083182L, result.getLeastSignificantBits());
137 assertEquals(-3324946881598961564L, result.getMostSignificantBits());
141 * Run the void setDecisionAttributes(Map<String,String>) method test.
145 * @generatedBy CodePro at 6/1/16 1:41 PM
148 public void testSetDecisionAttributes_1()
150 DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
151 Map<String, String> decisionAttributes = new Hashtable<String, String>();
153 fixture.setDecisionAttributes(decisionAttributes);
155 // add additional test code here
159 * Run the void setECOMPComponentName(String) method test.
163 * @generatedBy CodePro at 6/1/16 1:41 PM
166 public void testSetECOMPComponentName_1()
168 DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
169 String eCOMPComponentName = "";
171 fixture.setECOMPComponentName(eCOMPComponentName);
173 // add additional test code here
177 * Run the void setRequestID(UUID) method test.
181 * @generatedBy CodePro at 6/1/16 1:41 PM
184 public void testSetRequestID_1()
186 DecisionRequestParameters fixture = new DecisionRequestParameters("", new Hashtable<String, String>(), UUID.randomUUID());
187 UUID requestID = UUID.randomUUID();
189 fixture.setRequestID(requestID);
191 // add additional test code here
195 * Perform pre-test initialization.
198 * if the initialization fails for some reason
200 * @generatedBy CodePro at 6/1/16 1:41 PM
205 // add additional set up code here
209 * Perform post-test clean-up.
212 * if the clean-up fails for some reason
214 * @generatedBy CodePro at 6/1/16 1:41 PM
217 public void tearDown()
219 // Add additional tear down code here
225 * @param args the command line arguments
227 * @generatedBy CodePro at 6/1/16 1:41 PM
229 public static void main(String[] args) {
230 new org.junit.runner.JUnitCore().run(DecisionRequestParametersTest.class);