diff options
author | 2017-08-31 15:16:38 -0400 | |
---|---|---|
committer | 2017-08-31 15:42:50 -0400 | |
commit | 7f535078ef80a7b7efa3e3325bfccb994fbd00e8 (patch) | |
tree | 66d908df2eb7cf0b048f754eac6b44619255eb8a /ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java | |
parent | 224487bc124df7988442a60d72d4aa106697306b (diff) |
Rename packages to org.onap in 1.4.0-SNAPSHOT
19 - remove openecomp
72 - remediate Sonar scan issues
79 - removed unwanted left menu under Report
90 - apply approved license text
Issue: PORTAL-19, PORTAL-72, PORTAL-79, PORTAL-90
Change-Id: I41a0ef5fba623d2242574bd15f2d9fb8029a496c
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java')
-rw-r--r-- | ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java new file mode 100644 index 00000000..97786046 --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java @@ -0,0 +1,29 @@ +package org.onap.portalapp.controller; + +import org.junit.Assert; +import org.junit.Test; +import org.onap.portalapp.core.MockApplicationContextTestSuite; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.util.SystemProperties; +import org.springframework.test.web.servlet.ResultActions; +import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; + + + +public class CollaborationControllerTest extends MockApplicationContextTestSuite{ + + @Test + public void testGetAvailableRoles() throws Exception { + MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/collaborate_list"); + User user = new User(); + user.setId(1l); + //user.setOrgUserId("abc"); + requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user); + + ResultActions ra =getMockMvc().perform(requestBuilder); + Assert.assertEquals(2,ra.andReturn().getModelAndView().getModelMap().size()); + } + + +} |