Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add coverage to a few Controllers
[policy/engine.git]
/
POLICY-SDK-APP
/
src
/
test
/
java
/
org
/
onap
/
policy
/
controller
/
AdminTabControllerTest.java
diff --git
a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java
b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java
index
68da8e7
..
85337f1
100644
(file)
--- a/
POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java
+++ b/
POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java
@@
-22,6
+22,7
@@
package org.onap.policy.controller;
package org.onap.policy.controller;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
@@
-54,6
+55,11
@@
public class AdminTabControllerTest {
private HttpServletRequest request;
private MockHttpServletResponse response;
private HttpServletRequest request;
private MockHttpServletResponse response;
+ /**
+ * Before.
+ *
+ * @throws Exception Exception
+ */
@Before
public void setUp() throws Exception {
@Before
public void setUp() throws Exception {
@@
-82,6
+88,7
@@
public class AdminTabControllerTest {
@Test
public void testGetAdminRole() {
AdminTabController admin = new AdminTabController();
@Test
public void testGetAdminRole() {
AdminTabController admin = new AdminTabController();
+ assertNotNull(AdminTabController.getCommonClassDao());
try {
admin.getAdminTabEntityData(request, response);
assertTrue(response.getContentAsString() != null && response.getContentAsString().contains("lockdowndata"));
try {
admin.getAdminTabEntityData(request, response);
assertTrue(response.getContentAsString() != null && response.getContentAsString().contains("lockdowndata"));