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 {
46 * Run the PDPNotification checkMatch(PDPNotification) method test.
50 * @generatedBy CodePro at 6/1/16 1:41 PM
53 public void testCheckMatch_1()
55 PDPNotification oldNotification = null;
57 PDPNotification result = MatchStore.checkMatch(oldNotification);
59 // add additional test code here
60 // An unexpected exception was thrown in user code while executing this test:
61 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
66 * Run the PDPNotification checkMatch(PDPNotification) method test.
70 * @generatedBy CodePro at 6/1/16 1:41 PM
73 public void testCheckMatch_2()
75 PDPNotification oldNotification = new StdPDPNotification();
77 PDPNotification result = MatchStore.checkMatch(oldNotification);
79 // add additional test code here
80 // An unexpected exception was thrown in user code while executing this test:
81 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
82 assertNotNull(result);
86 * Run the PDPNotification checkMatch(PDPNotification) method test.
90 * @generatedBy CodePro at 6/1/16 1:41 PM
93 public void testCheckMatch_3()
95 PDPNotification oldNotification = new StdPDPNotification();
97 PDPNotification result = MatchStore.checkMatch(oldNotification);
99 // add additional test code here
100 // An unexpected exception was thrown in user code while executing this test:
101 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
102 assertNotNull(result);
106 * Run the PDPNotification checkMatch(PDPNotification) method test.
110 * @generatedBy CodePro at 6/1/16 1:41 PM
113 public void testCheckMatch_4()
115 PDPNotification oldNotification = new StdPDPNotification();
117 PDPNotification result = MatchStore.checkMatch(oldNotification);
119 // add additional test code here
120 // An unexpected exception was thrown in user code while executing this test:
121 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
122 assertNotNull(result);
126 * Run the PDPNotification checkMatch(PDPNotification) method test.
130 * @generatedBy CodePro at 6/1/16 1:41 PM
133 public void testCheckMatch_5()
135 PDPNotification oldNotification = new StdPDPNotification();
137 PDPNotification result = MatchStore.checkMatch(oldNotification);
139 // add additional test code here
140 // An unexpected exception was thrown in user code while executing this test:
141 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
142 assertNotNull(result);
146 * Run the PDPNotification checkMatch(PDPNotification) method test.
150 * @generatedBy CodePro at 6/1/16 1:41 PM
153 public void testCheckMatch_6()
155 PDPNotification oldNotification = new StdPDPNotification();
157 PDPNotification result = MatchStore.checkMatch(oldNotification);
159 // add additional test code here
160 // An unexpected exception was thrown in user code while executing this test:
161 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
162 assertNotNull(result);
166 * Run the PDPNotification checkMatch(PDPNotification) method test.
170 * @generatedBy CodePro at 6/1/16 1:41 PM
173 public void testCheckMatch_7()
175 PDPNotification oldNotification = new StdPDPNotification();
177 PDPNotification result = MatchStore.checkMatch(oldNotification);
179 // add additional test code here
180 // An unexpected exception was thrown in user code while executing this test:
181 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
182 assertNotNull(result);
186 * Run the PDPNotification checkMatch(PDPNotification) method test.
190 * @generatedBy CodePro at 6/1/16 1:41 PM
193 public void testCheckMatch_8()
195 PDPNotification oldNotification = new StdPDPNotification();
197 PDPNotification result = MatchStore.checkMatch(oldNotification);
199 // add additional test code here
200 // An unexpected exception was thrown in user code while executing this test:
201 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
202 assertNotNull(result);
206 * Run the PDPNotification checkMatch(PDPNotification) method test.
210 * @generatedBy CodePro at 6/1/16 1:41 PM
213 public void testCheckMatch_9()
215 PDPNotification oldNotification = new StdPDPNotification();
217 PDPNotification result = MatchStore.checkMatch(oldNotification);
219 // add additional test code here
220 // An unexpected exception was thrown in user code while executing this test:
221 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
222 assertNotNull(result);
226 * Run the PDPNotification checkMatch(PDPNotification) method test.
230 * @generatedBy CodePro at 6/1/16 1:41 PM
233 public void testCheckMatch_10()
235 PDPNotification oldNotification = new StdPDPNotification();
237 PDPNotification result = MatchStore.checkMatch(oldNotification);
239 // add additional test code here
240 // An unexpected exception was thrown in user code while executing this test:
241 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
242 assertNotNull(result);
246 * Run the PDPNotification checkMatch(PDPNotification) method test.
250 * @generatedBy CodePro at 6/1/16 1:41 PM
253 public void testCheckMatch_11()
255 PDPNotification oldNotification = new StdPDPNotification();
257 PDPNotification result = MatchStore.checkMatch(oldNotification);
259 // add additional test code here
260 // An unexpected exception was thrown in user code while executing this test:
261 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
262 assertNotNull(result);
266 * Run the PDPNotification checkMatch(PDPNotification) method test.
270 * @generatedBy CodePro at 6/1/16 1:41 PM
273 public void testCheckMatch_12()
275 PDPNotification oldNotification = new StdPDPNotification();
277 PDPNotification result = MatchStore.checkMatch(oldNotification);
279 // add additional test code here
280 // An unexpected exception was thrown in user code while executing this test:
281 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
282 assertNotNull(result);
286 * Run the PDPNotification checkMatch(PDPNotification) method test.
290 * @generatedBy CodePro at 6/1/16 1:41 PM
293 public void testCheckMatch_13()
295 PDPNotification oldNotification = new StdPDPNotification();
297 PDPNotification result = MatchStore.checkMatch(oldNotification);
299 // add additional test code here
300 // An unexpected exception was thrown in user code while executing this test:
301 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
302 assertNotNull(result);
306 * Run the PDPNotification checkMatch(PDPNotification) method test.
310 * @generatedBy CodePro at 6/1/16 1:41 PM
313 public void testCheckMatch_14()
315 PDPNotification oldNotification = new StdPDPNotification();
317 PDPNotification result = MatchStore.checkMatch(oldNotification);
319 // add additional test code here
320 // An unexpected exception was thrown in user code while executing this test:
321 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
322 assertNotNull(result);
326 * Run the PDPNotification checkMatch(PDPNotification) method test.
330 * @generatedBy CodePro at 6/1/16 1:41 PM
333 public void testCheckMatch_15()
335 PDPNotification oldNotification = new StdPDPNotification();
337 PDPNotification result = MatchStore.checkMatch(oldNotification);
339 // add additional test code here
340 // An unexpected exception was thrown in user code while executing this test:
341 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
342 assertNotNull(result);
346 * Run the PDPNotification checkMatch(PDPNotification) method test.
350 * @generatedBy CodePro at 6/1/16 1:41 PM
353 public void testCheckMatch_16()
355 PDPNotification oldNotification = new StdPDPNotification();
357 PDPNotification result = MatchStore.checkMatch(oldNotification);
359 // add additional test code here
360 // An unexpected exception was thrown in user code while executing this test:
361 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
362 assertNotNull(result);
366 * Run the HashSet<Matches> getMatchStore() method test.
370 * @generatedBy CodePro at 6/1/16 1:41 PM
373 public void testGetMatchStore_1()
376 HashSet<Matches> result = MatchStore.getMatchStore();
378 // add additional test code here
379 // An unexpected exception was thrown in user code while executing this test:
380 // java.lang.ExceptionInInitializerError
381 // at org.apache.log4j.Logger.getLogger(Logger.java:104)
382 // at org.onap.policy.std.MatchStore.<clinit>(MatchStore.java:15)
383 assertNotNull(result);
387 * Run the void storeMatch(Matches) method test.
391 * @generatedBy CodePro at 6/1/16 1:41 PM
394 public void testStoreMatch_1()
396 Matches newMatch = new Matches();
397 newMatch.setConfigName("");
398 newMatch.setOnapName("");
400 MatchStore.storeMatch(newMatch);
402 // add additional test code here
403 // An unexpected exception was thrown in user code while executing this test:
404 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
408 * Run the void storeMatch(Matches) method test.
412 * @generatedBy CodePro at 6/1/16 1:41 PM
415 public void testStoreMatch_2()
417 Matches newMatch = new Matches();
418 newMatch.setConfigName("");
419 newMatch.setOnapName("");
421 MatchStore.storeMatch(newMatch);
423 // add additional test code here
424 // An unexpected exception was thrown in user code while executing this test:
425 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
429 * Run the void storeMatch(Matches) method test.
433 * @generatedBy CodePro at 6/1/16 1:41 PM
436 public void testStoreMatch_3()
438 Matches newMatch = new Matches();
439 newMatch.setConfigName("");
440 newMatch.setOnapName("");
442 MatchStore.storeMatch(newMatch);
444 // add additional test code here
445 // An unexpected exception was thrown in user code while executing this test:
446 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
450 * Run the void storeMatch(Matches) method test.
454 * @generatedBy CodePro at 6/1/16 1:41 PM
457 public void testStoreMatch_4()
459 Matches newMatch = new Matches();
460 newMatch.setConfigAttributes(new Hashtable<String, String>());
461 newMatch.setConfigName("");
462 newMatch.setOnapName("");
464 MatchStore.storeMatch(newMatch);
466 // add additional test code here
467 // An unexpected exception was thrown in user code while executing this test:
468 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
472 * Run the void storeMatch(Matches) method test.
476 * @generatedBy CodePro at 6/1/16 1:41 PM
479 public void testStoreMatch_5()
481 Matches newMatch = new Matches();
482 newMatch.setConfigAttributes(new Hashtable<String, String>());
483 newMatch.setConfigName("");
484 newMatch.setOnapName("");
486 MatchStore.storeMatch(newMatch);
488 // add additional test code here
489 // An unexpected exception was thrown in user code while executing this test:
490 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
494 * Run the void storeMatch(Matches) method test.
498 * @generatedBy CodePro at 6/1/16 1:41 PM
501 public void testStoreMatch_6()
503 Matches newMatch = new Matches();
504 newMatch.setConfigAttributes(new Hashtable<String, String>());
505 newMatch.setConfigName("");
506 newMatch.setOnapName("");
508 MatchStore.storeMatch(newMatch);
510 // add additional test code here
511 // An unexpected exception was thrown in user code while executing this test:
512 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
516 * Run the void storeMatch(Matches) method test.
520 * @generatedBy CodePro at 6/1/16 1:41 PM
523 public void testStoreMatch_7()
525 Matches newMatch = new Matches();
526 newMatch.setConfigAttributes(new Hashtable<String, String>());
527 newMatch.setConfigName("");
528 newMatch.setOnapName("");
530 MatchStore.storeMatch(newMatch);
532 // add additional test code here
533 // An unexpected exception was thrown in user code while executing this test:
534 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
538 * Run the void storeMatch(Matches) method test.
542 * @generatedBy CodePro at 6/1/16 1:41 PM
545 public void testStoreMatch_8()
547 Matches newMatch = new Matches();
548 newMatch.setConfigName("");
549 newMatch.setOnapName("");
551 MatchStore.storeMatch(newMatch);
553 // add additional test code here
554 // An unexpected exception was thrown in user code while executing this test:
555 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
559 * Run the void storeMatch(Matches) method test.
563 * @generatedBy CodePro at 6/1/16 1:41 PM
566 public void testStoreMatch_9()
568 Matches newMatch = new Matches();
569 newMatch.setOnapName("");
571 MatchStore.storeMatch(newMatch);
573 // add additional test code here
574 // An unexpected exception was thrown in user code while executing this test:
575 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
579 * Run the void storeMatch(Matches) method test.
583 * @generatedBy CodePro at 6/1/16 1:41 PM
586 public void testStoreMatch_10()
588 Matches newMatch = new Matches();
589 newMatch.setConfigAttributes(new Hashtable<String, String>());
590 newMatch.setConfigName("");
591 newMatch.setOnapName("");
593 MatchStore.storeMatch(newMatch);
595 // add additional test code here
596 // An unexpected exception was thrown in user code while executing this test:
597 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
601 * Run the void storeMatch(Matches) method test.
605 * @generatedBy CodePro at 6/1/16 1:41 PM
608 public void testStoreMatch_11()
610 Matches newMatch = new Matches();
611 newMatch.setConfigAttributes(new Hashtable<String, String>());
612 newMatch.setConfigName("");
613 newMatch.setOnapName("");
615 MatchStore.storeMatch(newMatch);
617 // add additional test code here
618 // An unexpected exception was thrown in user code while executing this test:
619 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
623 * Run the void storeMatch(Matches) method test.
627 * @generatedBy CodePro at 6/1/16 1:41 PM
630 public void testStoreMatch_12()
632 Matches newMatch = new Matches();
633 newMatch.setConfigAttributes(new Hashtable<String, String>());
634 newMatch.setConfigName("");
635 newMatch.setOnapName("");
637 MatchStore.storeMatch(newMatch);
639 // add additional test code here
640 // An unexpected exception was thrown in user code while executing this test:
641 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
645 * Run the void storeMatch(Matches) method test.
649 * @generatedBy CodePro at 6/1/16 1:41 PM
652 public void testStoreMatch_13()
654 Matches newMatch = new Matches();
655 newMatch.setConfigAttributes(new Hashtable<String, String>());
656 newMatch.setConfigName("");
657 newMatch.setOnapName("");
659 MatchStore.storeMatch(newMatch);
661 // add additional test code here
662 // An unexpected exception was thrown in user code while executing this test:
663 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
667 * Run the void storeMatch(Matches) method test.
671 * @generatedBy CodePro at 6/1/16 1:41 PM
674 public void testStoreMatch_14()
676 Matches newMatch = new Matches();
677 newMatch.setConfigAttributes(new Hashtable<String, String>());
678 newMatch.setConfigName("");
679 newMatch.setOnapName("");
681 MatchStore.storeMatch(newMatch);
683 // add additional test code here
684 // An unexpected exception was thrown in user code while executing this test:
685 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
689 * Run the void storeMatch(Matches) method test.
693 * @generatedBy CodePro at 6/1/16 1:41 PM
696 public void testStoreMatch_15()
698 Matches newMatch = new Matches();
700 MatchStore.storeMatch(newMatch);
702 // add additional test code here
703 // An unexpected exception was thrown in user code while executing this test:
704 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
708 * Run the void storeMatch(Matches) method test.
712 * @generatedBy CodePro at 6/1/16 1:41 PM
715 public void testStoreMatch_16()
717 Matches newMatch = null;
719 MatchStore.storeMatch(newMatch);
721 // add additional test code here
722 // An unexpected exception was thrown in user code while executing this test:
723 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.MatchStore
727 * Perform pre-test initialization.
730 * if the initialization fails for some reason
732 * @generatedBy CodePro at 6/1/16 1:41 PM
737 // add additional set up code here
741 * Perform post-test clean-up.
744 * if the clean-up fails for some reason
746 * @generatedBy CodePro at 6/1/16 1:41 PM
749 public void tearDown()
751 // Add additional tear down code here
757 * @param args the command line arguments
759 * @generatedBy CodePro at 6/1/16 1:41 PM
761 public static void main(String[] args) {
762 new org.junit.runner.JUnitCore().run(MatchStoreTest.class);