Added test file for ConfigModelService 29/69329/1
authorArundathi Patil <arundpil@in.ibm.com>
Thu, 27 Sep 2018 14:10:39 +0000 (19:40 +0530)
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>
Thu, 27 Sep 2018 14:10:49 +0000 (19:40 +0530)
Added test file for class ConfigModelService

Issue-ID: CCSDK-552
Change-Id: Ie175d141b70494961118f249c48d00d42677d654
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelServiceTest.java [new file with mode: 0644]

diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelServiceTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelServiceTest.java
new file mode 100644 (file)
index 0000000..d6a71e0
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ *  Copyright © 2018 IBM.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.onap.ccsdk.apps.controllerblueprints.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import java.lang.System;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;
+import org.onap.ccsdk.apps.controllerblueprints.service.repository.ConfigModelContentRepository;
+import org.onap.ccsdk.apps.controllerblueprints.service.repository.ConfigModelRepository;
+
+public class ConfigModelServiceTest {
+    private ConfigModelService configModelService;
+
+    @Test(expected = NullPointerException.class)
+    public void testGetInitialConfigModel() throws BluePrintException {
+        Assert.assertEquals(null, configModelService.getInitialConfigModel(""));
+    }
+}