1 /*******************************************************************************
\r
2 * ============LICENSE_START====================================================
\r
4 * * ===========================================================================
\r
5 * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * * ===========================================================================
\r
7 * * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * * you may not use this file except in compliance with the License.
\r
9 * * You may obtain a copy of the License at
\r
11 * * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * * Unless required by applicable law or agreed to in writing, software
\r
14 * * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * * See the License for the specific language governing permissions and
\r
17 * * limitations under the License.
\r
18 * * ============LICENSE_END====================================================
\r
20 * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
\r
22 ******************************************************************************/
\r
23 package org.onap.aaf.cass;
\r
25 import org.junit.After;
\r
26 import org.junit.Before;
\r
27 import org.junit.Test;
\r
28 import org.onap.aaf.cadi.aaf.cass.AAFBase;
\r
30 import static org.junit.Assert.*;
\r
32 public class JU_AAFBaseTest
\r
43 public void tearDown()
\r
49 * Testing Conditon(s): Default
\r
52 public void test_method_setAccess_0_branch_0()
\r
54 System.out.println("Now Testing Method:setAccess Branch:0");
\r
57 AAFBase.setAccess(null);
\r
62 * Testing Conditon(s): if: (!props_ok)
\r
65 public void test_method_validateConfiguration_1_branch_0()
\r
67 System.out.println("Now Testing Method:validateConfiguration Branch:0");
\r
74 * Testing Conditon(s): else: Not (!props_ok)
\r
77 public void test_method_validateConfiguration_1_branch_1()
\r
79 System.out.println("Now Testing Method:validateConfiguration Branch:1");
\r
89 * Testing Conditon(s): if: (aafAuthn == null), if: (access==null), if: (cadi_props == null), if: (cp.exists())
\r
92 public void test_method_setup_2_branch_0()
\r
94 System.out.println("Now Testing Method:setup Branch:0");
\r
102 * Testing Conditon(s): if: (aafAuthn == null), if: (access==null), if: (cadi_props == null), else: Not (cp.exists())
\r
105 public void test_method_setup_2_branch_1()
\r
107 System.out.println("Now Testing Method:setup Branch:1");
\r
114 * Testing Conditon(s): if: (aafAuthn == null), if: (access==null), else: Not (cadi_props == null)
\r
117 public void test_method_setup_2_branch_2()
\r
119 System.out.println("Now Testing Method:setup Branch:2");
\r
125 * Testing Conditon(s): if: (aafAuthn == null), else: Not (access==null)
\r
128 public void test_method_setup_2_branch_3()
\r
130 System.out.println("Now Testing Method:setup Branch:3");
\r
136 * Testing Conditon(s): if: (aafAuthn == null), if: ((perm_type = Config.logProp(access, "cass_group_name",null))==null)
\r
139 public void test_method_setup_2_branch_4()
\r
141 System.out.println("Now Testing Method:setup Branch:4");
\r
148 * Testing Conditon(s): if: (aafAuthn == null), else: Not ((perm_type = Config.logProp(access, "cass_group_name",null))==null)
\r
151 public void test_method_setup_2_branch_5()
\r
153 System.out.println("Now Testing Method:setup Branch:5");
\r
159 * Testing Conditon(s): if: (aafAuthn == null), if: ((cluster_name = Config.logProp(access,"cass_cluster_name",null))==null), if: ((cluster_name = DatabaseDescriptor.getClusterName())==null)
\r
162 public void test_method_setup_2_branch_6()
\r
164 System.out.println("Now Testing Method:setup Branch:6");
\r
171 * Testing Conditon(s): if: (aafAuthn == null), if: ((cluster_name = Config.logProp(access,"cass_cluster_name",null))==null), else: Not ((cluster_name = DatabaseDescriptor.getClusterName())==null)
\r
174 public void test_method_setup_2_branch_7()
\r
176 System.out.println("Now Testing Method:setup Branch:7");
\r
183 * Testing Conditon(s): if: (aafAuthn == null), else: Not ((cluster_name = Config.logProp(access,"cass_cluster_name",null))==null)
\r
186 public void test_method_setup_2_branch_8()
\r
188 System.out.println("Now Testing Method:setup Branch:8");
\r
195 * Testing Conditon(s): if: (aafAuthn == null), if: ((default_realm = Config.logProp(access, Config.AAF_DEFAULT_REALM, null))==null)
\r
198 public void test_method_setup_2_branch_9()
\r
200 System.out.println("Now Testing Method:setup Branch:9");
\r
206 * Testing Conditon(s): if: (aafAuthn == null), else: Not ((default_realm = Config.logProp(access, Config.AAF_DEFAULT_REALM, null))==null)
\r
209 public void test_method_setup_2_branch_10()
\r
211 System.out.println("Now Testing Method:setup Branch:10");
\r
217 * Testing Conditon(s): if: (aafAuthn == null), if: (props_ok==false)
\r
220 public void test_method_setup_2_branch_11()
\r
222 System.out.println("Now Testing Method:setup Branch:11");
\r
228 * Testing Conditon(s): if: (aafAuthn == null), else: Not (props_ok==false)
\r
231 public void test_method_setup_2_branch_12()
\r
233 System.out.println("Now Testing Method:setup Branch:12");
\r
239 * Testing Conditon(s): if: (aafAuthn == null), if: (lur instanceof EpiLur), for: (int i=0; (lur = elur.get(i))!=null;++i), if: (lur instanceof AbsAAFLur)
\r
242 public void test_method_setup_2_branch_13()
\r
244 System.out.println("Now Testing Method:setup Branch:13");
\r
251 * Testing Conditon(s): if: (aafAuthn == null), if: (lur instanceof EpiLur), for: (int i=0; (lur = elur.get(i))!=null;++i), else: Not (lur instanceof AbsAAFLur), if: (lur instanceof LocalLur)
\r
254 public void test_method_setup_2_branch_14()
\r
256 System.out.println("Now Testing Method:setup Branch:14");
\r
262 * Testing Conditon(s): if: (aafAuthn == null), if: (lur instanceof EpiLur), for: (int i=0; (lur = elur.get(i))!=null;++i), else: Not (lur instanceof AbsAAFLur), else: Not (lur instanceof LocalLur)
\r
265 public void test_method_setup_2_branch_15()
\r
267 System.out.println("Now Testing Method:setup Branch:15");
\r
274 * Testing Conditon(s): if: (aafAuthn == null), if: (lur instanceof EpiLur), for: Not (int i=0; (lur = elur.get(i))!=null;++i)
\r
277 public void test_method_setup_2_branch_16()
\r
279 System.out.println("Now Testing Method:setup Branch:16");
\r
285 * Testing Conditon(s): if: (aafAuthn == null), else: Not (lur instanceof EpiLur), if: (lur instanceof AbsAAFLur)
\r
288 public void test_method_setup_2_branch_17()
\r
290 System.out.println("Now Testing Method:setup Branch:17");
\r
297 * Testing Conditon(s): if: (aafAuthn == null), else: Not (lur instanceof EpiLur), else: Not (lur instanceof AbsAAFLur)
\r
300 public void test_method_setup_2_branch_18()
\r
302 System.out.println("Now Testing Method:setup Branch:18");
\r
309 * Testing Conditon(s): if: (aafAuthn == null), if: (aafAuthn==null)
\r
312 public void test_method_setup_2_branch_19()
\r
314 System.out.println("Now Testing Method:setup Branch:19");
\r
321 * Testing Conditon(s): if: (aafAuthn == null), else: Not (aafAuthn==null)
\r
324 public void test_method_setup_2_branch_20()
\r
326 System.out.println("Now Testing Method:setup Branch:20");
\r
333 * Testing Conditon(s): if: (aafAuthn == null), if: (access!=null)
\r
336 public void test_method_setup_2_branch_21()
\r
338 System.out.println("Now Testing Method:setup Branch:21");
\r
345 * Testing Conditon(s): if: (aafAuthn == null), else: Not (access!=null)
\r
348 public void test_method_setup_2_branch_22()
\r
350 System.out.println("Now Testing Method:setup Branch:22");
\r
356 * Testing Conditon(s): else: Not (aafAuthn == null)
\r
359 public void test_method_setup_2_branch_23()
\r
361 System.out.println("Now Testing Method:setup Branch:23");
\r
366 * Testing Conditon(s): Default
\r
369 public void test_method_protectedResources_3_branch_0()
\r
371 System.out.println("Now Testing Method:protectedResources Branch:0");
\r
377 * Testing Conditon(s): Default
\r
380 public void test_method_supportedOptions_4_branch_0()
\r
382 System.out.println("Now Testing Method:supportedOptions Branch:0");
\r
388 * Testing Conditon(s): Default
\r
391 public void test_method_alterableOptions_5_branch_0()
\r
393 System.out.println("Now Testing Method:alterableOptions Branch:0");
\r