Improve code coverage for aaf cadi modules
[aaf/cadi.git] / cass / src / test / java / org / onap / aaf / cadi / aaf / cass / test / AAFBaseTest.java
diff --git a/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFBaseTest.java b/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFBaseTest.java
new file mode 100644 (file)
index 0000000..db9f256
--- /dev/null
@@ -0,0 +1,399 @@
+/*******************************************************************************\r
+ * ============LICENSE_START====================================================\r
+ * * org.onap.aaf\r
+ * * ===========================================================================\r
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
+ * * ===========================================================================\r
+ * * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * * you may not use this file except in compliance with the License.\r
+ * * You may obtain a copy of the License at\r
+ * * \r
+ *  *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * * \r
+ *  * Unless required by applicable law or agreed to in writing, software\r
+ * * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * * See the License for the specific language governing permissions and\r
+ * * limitations under the License.\r
+ * * ============LICENSE_END====================================================\r
+ * *\r
+ * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
+ * *\r
+ ******************************************************************************/\r
+package org.onap.aaf.cadi.aaf.cass.test;\r
+\r
+import org.junit.After;\r
+import org.junit.Before;\r
+import org.junit.Test;\r
+import org.onap.aaf.cadi.aaf.cass.AAFBase;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+public class AAFBaseTest\r
+{\r
+       \r
+\r
+       @Before\r
+       public void setUp()\r
+       {\r
+               \r
+       }\r
+\r
+       @After\r
+       public void tearDown()\r
+       {\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): Default\r
+        */\r
+       @Test\r
+       public void test_method_setAccess_0_branch_0()\r
+       {\r
+               System.out.println("Now Testing Method:setAccess Branch:0");\r
+               \r
+               //Call Method\r
+               AAFBase.setAccess(null);\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (!props_ok)\r
+        */\r
+       @Test\r
+       public void test_method_validateConfiguration_1_branch_0()\r
+       {\r
+               System.out.println("Now Testing Method:validateConfiguration Branch:0");\r
+               \r
+               \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): else: Not (!props_ok)\r
+        */\r
+       @Test\r
+       public void test_method_validateConfiguration_1_branch_1()\r
+       {\r
+               System.out.println("Now Testing Method:validateConfiguration Branch:1");\r
+               \r
+       \r
+               \r
+               //Call Method\r
+       \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: (access==null), if: (cadi_props == null), if: (cp.exists())\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_0()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:0");\r
+               \r
+\r
+               \r
+       \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: (access==null), if: (cadi_props == null), else: Not (cp.exists())\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_1()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:1");\r
+               \r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: (access==null), else: Not (cadi_props == null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_2()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:2");\r
+               \r
+\r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not (access==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_3()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:3");\r
+               \r
+\r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: ((perm_type = Config.logProp(access, "cass_group_name",null))==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_4()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:4");\r
+               \r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not ((perm_type = Config.logProp(access, "cass_group_name",null))==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_5()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:5");\r
+               \r
+\r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: ((cluster_name = Config.logProp(access,"cass_cluster_name",null))==null), if: ((cluster_name = DatabaseDescriptor.getClusterName())==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_6()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:6");\r
+               \r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * 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
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_7()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:7");\r
+               \r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not ((cluster_name = Config.logProp(access,"cass_cluster_name",null))==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_8()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:8");\r
+               \r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: ((default_realm = Config.logProp(access, Config.AAF_DEFAULT_REALM, null))==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_9()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:9");\r
+               \r
+\r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not ((default_realm = Config.logProp(access, Config.AAF_DEFAULT_REALM, null))==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_10()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:10");\r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: (props_ok==false)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_11()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:11");\r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not (props_ok==false)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_12()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:12");\r
+               \r
+               \r
+       }\r
+\r
+       /*\r
+        * 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
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_13()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:13");\r
+               \r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * 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
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_14()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:14");\r
+               \r
+\r
+       }\r
+\r
+       /*\r
+        * 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
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_15()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:15");\r
+               \r
+       \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: (lur instanceof EpiLur), for: Not (int i=0; (lur = elur.get(i))!=null;++i)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_16()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:16");\r
+\r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not (lur instanceof EpiLur), if: (lur instanceof AbsAAFLur)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_17()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:17");\r
+               \r
+       \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not (lur instanceof EpiLur), else: Not (lur instanceof AbsAAFLur)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_18()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:18");\r
+               \r
+       \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: (aafAuthn==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_19()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:19");\r
+               \r
+       \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not (aafAuthn==null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_20()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:20");\r
+               \r
+       \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), if: (access!=null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_21()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:21");\r
+               \r
+               \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): if: (aafAuthn == null), else: Not (access!=null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_22()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:22");\r
+               \r
+       \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): else: Not (aafAuthn == null)\r
+        */\r
+       @Test\r
+       public void test_method_setup_2_branch_23()\r
+       {\r
+               System.out.println("Now Testing Method:setup Branch:23");\r
+       \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): Default\r
+        */\r
+       @Test\r
+       public void test_method_protectedResources_3_branch_0()\r
+       {\r
+               System.out.println("Now Testing Method:protectedResources Branch:0");\r
+               \r
+               \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): Default\r
+        */\r
+       @Test\r
+       public void test_method_supportedOptions_4_branch_0()\r
+       {\r
+               System.out.println("Now Testing Method:supportedOptions Branch:0");\r
+               \r
+       \r
+       }\r
+\r
+       /*\r
+        * Testing Conditon(s): Default\r
+        */\r
+       @Test\r
+       public void test_method_alterableOptions_5_branch_0()\r
+       {\r
+               System.out.println("Now Testing Method:alterableOptions Branch:0");\r
+               \r
+       \r
+               \r
+       }\r
+\r
+}\r