summaryrefslogtreecommitdiffstats
path: root/ms/neng/src/test/java
diff options
context:
space:
mode:
authorDan Timoney <dt5972@att.com>2018-09-14 19:48:39 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-14 19:48:39 +0000
commitecdb4224426ea59e070d1e6c759e5f1bfb65f84b (patch)
tree73648d765c51f24f63173cf4e1ae49c3984ac08f /ms/neng/src/test/java
parent38e47e439bd0eb6d8e7b25100788ef4ff0c53ffe (diff)
parent0963b7d3e249f7474e714c0b397e3e1a1dff41c8 (diff)
Merge "added test cases to SpringServiceTest.java"
Diffstat (limited to 'ms/neng/src/test/java')
-rw-r--r--ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java
index 303692c5..b4821a21 100644
--- a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java
+++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 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
@@ -31,6 +33,7 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.ccsdk.apps.ms.neng.core.resource.model.HelloWorld;
import org.onap.ccsdk.apps.ms.neng.core.resource.model.NameGenRequest;
import org.onap.ccsdk.apps.ms.neng.core.validator.ExternalKeyValidator;
import org.onap.ccsdk.apps.ms.neng.persistence.entity.GeneratedName;
@@ -105,4 +108,16 @@ public class SpringServiceTest {
Mockito.when(generatedNameRepository.findByExternalId(req.get("external-key"))).thenReturn(generatedNameList);
Assert.assertNotNull(springserviceImpl.releaseNetworkElementName(request));
}
+
+ @Test
+ public void testGetQuickHello()
+ {
+ Assert.assertTrue(springserviceImpl.getQuickHello("testMessage") instanceof HelloWorld);
+ }
+
+ @Test
+ public void testGetQuickHelloForNullMessage()
+ {
+ Assert.assertTrue(springserviceImpl.getQuickHello("") instanceof HelloWorld);
+ }
}