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.std.test;
23 import static org.junit.Assert.assertNotNull;
24 import static org.junit.Assert.assertNull;
26 import java.util.HashSet;
27 import java.util.Hashtable;
29 import org.junit.After;
30 import org.junit.Before;
31 import org.junit.Test;
32 import org.onap.policy.api.PDPNotification;
33 import org.onap.policy.std.MatchStore;
34 import org.onap.policy.std.Matches;
35 import org.onap.policy.std.StdPDPNotification;
38 * The class <code>MatchStoreTest</code> contains tests for the class <code>{@link MatchStore}</code>.
40 * @generatedBy CodePro at 6/1/16 1:41 PM
41 * @version $Revision: 1.0 $
43 public class MatchStoreTest {
45 * Run the MatchStore() constructor test.
47 * @generatedBy CodePro at 6/1/16 1:41 PM
50 public void testMatchStore_1()
52 MatchStore result = new MatchStore();
53 assertNotNull(result);
54 // add additional test code here
58 * Run the PDPNotification checkMatch(PDPNotification) method test.
62 * @generatedBy CodePro at 6/1/16 1:41 PM
65 public void testCheckMatch_1()
67 PDPNotification oldNotification = null;
69 PDPNotification result = MatchStore.checkMatch(oldNotification);
71 // add additional test code here
72 // An unexpected exception was thrown in user code while executing this test:
73 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
78 * Run the PDPNotification checkMatch(PDPNotification) method test.
82 * @generatedBy CodePro at 6/1/16 1:41 PM
85 public void testCheckMatch_2()
87 PDPNotification oldNotification = new StdPDPNotification();
89 PDPNotification result = MatchStore.checkMatch(oldNotification);
91 // add additional test code here
92 // An unexpected exception was thrown in user code while executing this test:
93 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
94 assertNotNull(result);
98 * Run the PDPNotification checkMatch(PDPNotification) method test.
102 * @generatedBy CodePro at 6/1/16 1:41 PM
105 public void testCheckMatch_3()
107 PDPNotification oldNotification = new StdPDPNotification();
109 PDPNotification result = MatchStore.checkMatch(oldNotification);
111 // add additional test code here
112 // An unexpected exception was thrown in user code while executing this test:
113 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
114 assertNotNull(result);
118 * Run the PDPNotification checkMatch(PDPNotification) method test.
122 * @generatedBy CodePro at 6/1/16 1:41 PM
125 public void testCheckMatch_4()
127 PDPNotification oldNotification = new StdPDPNotification();
129 PDPNotification result = MatchStore.checkMatch(oldNotification);
131 // add additional test code here
132 // An unexpected exception was thrown in user code while executing this test:
133 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
134 assertNotNull(result);
138 * Run the PDPNotification checkMatch(PDPNotification) method test.
142 * @generatedBy CodePro at 6/1/16 1:41 PM
145 public void testCheckMatch_5()
147 PDPNotification oldNotification = new StdPDPNotification();
149 PDPNotification result = MatchStore.checkMatch(oldNotification);
151 // add additional test code here
152 // An unexpected exception was thrown in user code while executing this test:
153 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
154 assertNotNull(result);
158 * Run the PDPNotification checkMatch(PDPNotification) method test.
162 * @generatedBy CodePro at 6/1/16 1:41 PM
165 public void testCheckMatch_6()
167 PDPNotification oldNotification = new StdPDPNotification();
169 PDPNotification result = MatchStore.checkMatch(oldNotification);
171 // add additional test code here
172 // An unexpected exception was thrown in user code while executing this test:
173 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
174 assertNotNull(result);
178 * Run the PDPNotification checkMatch(PDPNotification) method test.
182 * @generatedBy CodePro at 6/1/16 1:41 PM
185 public void testCheckMatch_7()
187 PDPNotification oldNotification = new StdPDPNotification();
189 PDPNotification result = MatchStore.checkMatch(oldNotification);
191 // add additional test code here
192 // An unexpected exception was thrown in user code while executing this test:
193 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
194 assertNotNull(result);
198 * Run the PDPNotification checkMatch(PDPNotification) method test.
202 * @generatedBy CodePro at 6/1/16 1:41 PM
205 public void testCheckMatch_8()
207 PDPNotification oldNotification = new StdPDPNotification();
209 PDPNotification result = MatchStore.checkMatch(oldNotification);
211 // add additional test code here
212 // An unexpected exception was thrown in user code while executing this test:
213 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
214 assertNotNull(result);
218 * Run the PDPNotification checkMatch(PDPNotification) method test.
222 * @generatedBy CodePro at 6/1/16 1:41 PM
225 public void testCheckMatch_9()
227 PDPNotification oldNotification = new StdPDPNotification();
229 PDPNotification result = MatchStore.checkMatch(oldNotification);
231 // add additional test code here
232 // An unexpected exception was thrown in user code while executing this test:
233 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
234 assertNotNull(result);
238 * Run the PDPNotification checkMatch(PDPNotification) method test.
242 * @generatedBy CodePro at 6/1/16 1:41 PM
245 public void testCheckMatch_10()
247 PDPNotification oldNotification = new StdPDPNotification();
249 PDPNotification result = MatchStore.checkMatch(oldNotification);
251 // add additional test code here
252 // An unexpected exception was thrown in user code while executing this test:
253 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
254 assertNotNull(result);
258 * Run the PDPNotification checkMatch(PDPNotification) method test.
262 * @generatedBy CodePro at 6/1/16 1:41 PM
265 public void testCheckMatch_11()
267 PDPNotification oldNotification = new StdPDPNotification();
269 PDPNotification result = MatchStore.checkMatch(oldNotification);
271 // add additional test code here
272 // An unexpected exception was thrown in user code while executing this test:
273 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
274 assertNotNull(result);
278 * Run the PDPNotification checkMatch(PDPNotification) method test.
282 * @generatedBy CodePro at 6/1/16 1:41 PM
285 public void testCheckMatch_12()
287 PDPNotification oldNotification = new StdPDPNotification();
289 PDPNotification result = MatchStore.checkMatch(oldNotification);
291 // add additional test code here
292 // An unexpected exception was thrown in user code while executing this test:
293 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
294 assertNotNull(result);
298 * Run the PDPNotification checkMatch(PDPNotification) method test.
302 * @generatedBy CodePro at 6/1/16 1:41 PM
305 public void testCheckMatch_13()
307 PDPNotification oldNotification = new StdPDPNotification();
309 PDPNotification result = MatchStore.checkMatch(oldNotification);
311 // add additional test code here
312 // An unexpected exception was thrown in user code while executing this test:
313 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
314 assertNotNull(result);
318 * Run the PDPNotification checkMatch(PDPNotification) method test.
322 * @generatedBy CodePro at 6/1/16 1:41 PM
325 public void testCheckMatch_14()
327 PDPNotification oldNotification = new StdPDPNotification();
329 PDPNotification result = MatchStore.checkMatch(oldNotification);
331 // add additional test code here
332 // An unexpected exception was thrown in user code while executing this test:
333 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
334 assertNotNull(result);
338 * Run the PDPNotification checkMatch(PDPNotification) method test.
342 * @generatedBy CodePro at 6/1/16 1:41 PM
345 public void testCheckMatch_15()
347 PDPNotification oldNotification = new StdPDPNotification();
349 PDPNotification result = MatchStore.checkMatch(oldNotification);
351 // add additional test code here
352 // An unexpected exception was thrown in user code while executing this test:
353 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
354 assertNotNull(result);
358 * Run the PDPNotification checkMatch(PDPNotification) method test.
362 * @generatedBy CodePro at 6/1/16 1:41 PM
365 public void testCheckMatch_16()
367 PDPNotification oldNotification = new StdPDPNotification();
369 PDPNotification result = MatchStore.checkMatch(oldNotification);
371 // add additional test code here
372 // An unexpected exception was thrown in user code while executing this test:
373 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
374 assertNotNull(result);
378 * Run the HashSet<Matches> getMatchStore() method test.
382 * @generatedBy CodePro at 6/1/16 1:41 PM
385 public void testGetMatchStore_1()
388 HashSet<Matches> result = MatchStore.getMatchStore();
390 // add additional test code here
391 // An unexpected exception was thrown in user code while executing this test:
392 // java.lang.ExceptionInInitializerError
393 // at org.apache.log4j.Logger.getLogger(Logger.java:104)
394 // at org.onap.policy.std.MatchStore.<clinit>(MatchStore.java:15)
395 assertNotNull(result);
399 * Run the void storeMatch(Matches) method test.
403 * @generatedBy CodePro at 6/1/16 1:41 PM
406 public void testStoreMatch_1()
408 Matches newMatch = new Matches();
409 newMatch.setConfigName("");
410 newMatch.setOnapName("");
412 MatchStore.storeMatch(newMatch);
414 // add additional test code here
415 // An unexpected exception was thrown in user code while executing this test:
416 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
420 * Run the void storeMatch(Matches) method test.
424 * @generatedBy CodePro at 6/1/16 1:41 PM
427 public void testStoreMatch_2()
429 Matches newMatch = new Matches();
430 newMatch.setConfigName("");
431 newMatch.setOnapName("");
433 MatchStore.storeMatch(newMatch);
435 // add additional test code here
436 // An unexpected exception was thrown in user code while executing this test:
437 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
441 * Run the void storeMatch(Matches) method test.
445 * @generatedBy CodePro at 6/1/16 1:41 PM
448 public void testStoreMatch_3()
450 Matches newMatch = new Matches();
451 newMatch.setConfigName("");
452 newMatch.setOnapName("");
454 MatchStore.storeMatch(newMatch);
456 // add additional test code here
457 // An unexpected exception was thrown in user code while executing this test:
458 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
462 * Run the void storeMatch(Matches) method test.
466 * @generatedBy CodePro at 6/1/16 1:41 PM
469 public void testStoreMatch_4()
471 Matches newMatch = new Matches();
472 newMatch.setConfigAttributes(new Hashtable<String, String>());
473 newMatch.setConfigName("");
474 newMatch.setOnapName("");
476 MatchStore.storeMatch(newMatch);
478 // add additional test code here
479 // An unexpected exception was thrown in user code while executing this test:
480 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
484 * Run the void storeMatch(Matches) method test.
488 * @generatedBy CodePro at 6/1/16 1:41 PM
491 public void testStoreMatch_5()
493 Matches newMatch = new Matches();
494 newMatch.setConfigAttributes(new Hashtable<String, String>());
495 newMatch.setConfigName("");
496 newMatch.setOnapName("");
498 MatchStore.storeMatch(newMatch);
500 // add additional test code here
501 // An unexpected exception was thrown in user code while executing this test:
502 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
506 * Run the void storeMatch(Matches) method test.
510 * @generatedBy CodePro at 6/1/16 1:41 PM
513 public void testStoreMatch_6()
515 Matches newMatch = new Matches();
516 newMatch.setConfigAttributes(new Hashtable<String, String>());
517 newMatch.setConfigName("");
518 newMatch.setOnapName("");
520 MatchStore.storeMatch(newMatch);
522 // add additional test code here
523 // An unexpected exception was thrown in user code while executing this test:
524 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
528 * Run the void storeMatch(Matches) method test.
532 * @generatedBy CodePro at 6/1/16 1:41 PM
535 public void testStoreMatch_7()
537 Matches newMatch = new Matches();
538 newMatch.setConfigAttributes(new Hashtable<String, String>());
539 newMatch.setConfigName("");
540 newMatch.setOnapName("");
542 MatchStore.storeMatch(newMatch);
544 // add additional test code here
545 // An unexpected exception was thrown in user code while executing this test:
546 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
550 * Run the void storeMatch(Matches) method test.
554 * @generatedBy CodePro at 6/1/16 1:41 PM
557 public void testStoreMatch_8()
559 Matches newMatch = new Matches();
560 newMatch.setConfigName("");
561 newMatch.setOnapName("");
563 MatchStore.storeMatch(newMatch);
565 // add additional test code here
566 // An unexpected exception was thrown in user code while executing this test:
567 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
571 * Run the void storeMatch(Matches) method test.
575 * @generatedBy CodePro at 6/1/16 1:41 PM
578 public void testStoreMatch_9()
580 Matches newMatch = new Matches();
581 newMatch.setOnapName("");
583 MatchStore.storeMatch(newMatch);
585 // add additional test code here
586 // An unexpected exception was thrown in user code while executing this test:
587 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
591 * Run the void storeMatch(Matches) method test.
595 * @generatedBy CodePro at 6/1/16 1:41 PM
598 public void testStoreMatch_10()
600 Matches newMatch = new Matches();
601 newMatch.setConfigAttributes(new Hashtable<String, String>());
602 newMatch.setConfigName("");
603 newMatch.setOnapName("");
605 MatchStore.storeMatch(newMatch);
607 // add additional test code here
608 // An unexpected exception was thrown in user code while executing this test:
609 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
613 * Run the void storeMatch(Matches) method test.
617 * @generatedBy CodePro at 6/1/16 1:41 PM
620 public void testStoreMatch_11()
622 Matches newMatch = new Matches();
623 newMatch.setConfigAttributes(new Hashtable<String, String>());
624 newMatch.setConfigName("");
625 newMatch.setOnapName("");
627 MatchStore.storeMatch(newMatch);
629 // add additional test code here
630 // An unexpected exception was thrown in user code while executing this test:
631 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
635 * Run the void storeMatch(Matches) method test.
639 * @generatedBy CodePro at 6/1/16 1:41 PM
642 public void testStoreMatch_12()
644 Matches newMatch = new Matches();
645 newMatch.setConfigAttributes(new Hashtable<String, String>());
646 newMatch.setConfigName("");
647 newMatch.setOnapName("");
649 MatchStore.storeMatch(newMatch);
651 // add additional test code here
652 // An unexpected exception was thrown in user code while executing this test:
653 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
657 * Run the void storeMatch(Matches) method test.
661 * @generatedBy CodePro at 6/1/16 1:41 PM
664 public void testStoreMatch_13()
666 Matches newMatch = new Matches();
667 newMatch.setConfigAttributes(new Hashtable<String, String>());
668 newMatch.setConfigName("");
669 newMatch.setOnapName("");
671 MatchStore.storeMatch(newMatch);
673 // add additional test code here
674 // An unexpected exception was thrown in user code while executing this test:
675 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
679 * Run the void storeMatch(Matches) method test.
683 * @generatedBy CodePro at 6/1/16 1:41 PM
686 public void testStoreMatch_14()
688 Matches newMatch = new Matches();
689 newMatch.setConfigAttributes(new Hashtable<String, String>());
690 newMatch.setConfigName("");
691 newMatch.setOnapName("");
693 MatchStore.storeMatch(newMatch);
695 // add additional test code here
696 // An unexpected exception was thrown in user code while executing this test:
697 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
701 * Run the void storeMatch(Matches) method test.
705 * @generatedBy CodePro at 6/1/16 1:41 PM
708 public void testStoreMatch_15()
710 Matches newMatch = new Matches();
712 MatchStore.storeMatch(newMatch);
714 // add additional test code here
715 // An unexpected exception was thrown in user code while executing this test:
716 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
720 * Run the void storeMatch(Matches) method test.
724 * @generatedBy CodePro at 6/1/16 1:41 PM
727 public void testStoreMatch_16()
729 Matches newMatch = null;
731 MatchStore.storeMatch(newMatch);
733 // add additional test code here
734 // An unexpected exception was thrown in user code while executing this test:
735 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
739 * Perform pre-test initialization.
742 * if the initialization fails for some reason
744 * @generatedBy CodePro at 6/1/16 1:41 PM
749 // add additional set up code here
753 * Perform post-test clean-up.
756 * if the clean-up fails for some reason
758 * @generatedBy CodePro at 6/1/16 1:41 PM
761 public void tearDown()
763 // Add additional tear down code here
769 * @param args the command line arguments
771 * @generatedBy CodePro at 6/1/16 1:41 PM
773 public static void main(String[] args) {
774 new org.junit.runner.JUnitCore().run(MatchStoreTest.class);