Unit test cases for iaas impl package
[appc.git] / appc-adapters / appc-iaas-adapter / appc-iaas-adapter-bundle / src / test / java / org / onap / appc / adapter / iaas / impl / TestServiceCatalogFactory.java
index 5042b5b..5cfda5f 100644 (file)
@@ -27,6 +27,9 @@ import java.util.Properties;
 import org.junit.Assert;\r
 import org.junit.Test;\r
 \r
+/**\r
+ * This class tests the service catalog factory against a known provider.\r
+ */\r
 public class TestServiceCatalogFactory {\r
 \r
     @Test\r
@@ -85,4 +88,33 @@ public class TestServiceCatalogFactory {
 \r
         Assert.assertNull(catalog);\r
     }\r
+\r
+    @Test\r
+    public void testGetServiceCatalogEmptyURL() {\r
+        String url = null;\r
+        String tenantIdentifier = null;\r
+        String principal = null;\r
+        String credential = null;\r
+        String domain = null;\r
+        Properties properties = null;\r
+        ServiceCatalog catalog = ServiceCatalogFactory.getServiceCatalog(url, tenantIdentifier, principal, credential,\r
+                domain, properties);\r
+\r
+        Assert.assertNull(catalog);\r
+    }\r
+\r
+    @Test\r
+    public void testGetServiceCatalogWithoutVersion() {\r
+        String url = "http://192.168.1.1:5000/";\r
+        String tenantIdentifier = null;\r
+        String principal = null;\r
+        String credential = null;\r
+        String domain = null;\r
+        Properties properties = null;\r
+        ServiceCatalog catalog = ServiceCatalogFactory.getServiceCatalog(url, tenantIdentifier, principal, credential,\r
+                domain, properties);\r
+\r
+        Assert.assertNull(catalog);\r
+    }\r
+\r
 }\r