summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command')
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/LoginBeanTest.java88
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostDroolsBeanTest.java65
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostSearchBeanTest.java193
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/UserRowBeanTest.java76
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/support/SearchResultTest.java76
5 files changed, 498 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/LoginBeanTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/LoginBeanTest.java
new file mode 100644
index 00000000..11fbe61a
--- /dev/null
+++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/LoginBeanTest.java
@@ -0,0 +1,88 @@
+/*
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software 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.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * 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.
+ *
+ * ============LICENSE_END============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.core.command;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class LoginBeanTest {
+
+
+ public LoginBean mockLoginBean()
+ {
+ LoginBean mockLoginBean = new LoginBean();
+ mockLoginBean.setLoginId("test12");
+ mockLoginBean.setLoginPwd("testPwd");
+ mockLoginBean.setHrid(null);
+ mockLoginBean.setUserid("test12");
+ mockLoginBean.setSiteAccess("testSiteAccess");
+ mockLoginBean.setLoginErrorMessage("error");
+ mockLoginBean.setUser(null);
+ mockLoginBean.setBusinessDirectMenu(null);
+ mockLoginBean.setMenu(null);
+ return mockLoginBean;
+ }
+
+ @Test
+ public void loginBeanTest()
+ {
+ LoginBean mockLoginBean = mockLoginBean();
+ LoginBean loginBean = new LoginBean();
+ loginBean.setLoginId("test12");
+ loginBean.setLoginPwd("testPwd");
+ loginBean.setHrid(null);
+ loginBean.setUserid("test12");
+ loginBean.setSiteAccess("testSiteAccess");
+ loginBean.setLoginErrorMessage("error");
+ loginBean.setUser(null);
+ loginBean.setBusinessDirectMenu(null);
+ loginBean.setMenu(null);
+
+ assertEquals(loginBean.getLoginId(),mockLoginBean.getLoginId());
+ assertEquals(loginBean.getLoginPwd(),mockLoginBean.getLoginPwd());
+ assertEquals(loginBean.getHrid(),mockLoginBean.getHrid());
+ assertEquals(loginBean.getSiteAccess(),mockLoginBean.getSiteAccess());
+ assertEquals(loginBean.getUserid(),mockLoginBean.getUserid());
+ assertEquals(loginBean.getLoginErrorMessage(),mockLoginBean.getLoginErrorMessage());
+ assertEquals(loginBean.getUser(),mockLoginBean.getUser());
+ assertEquals(loginBean.getBusinessDirectMenu(),mockLoginBean.getBusinessDirectMenu());
+ assertEquals(loginBean.getMenu(),mockLoginBean.getMenu());
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostDroolsBeanTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostDroolsBeanTest.java
new file mode 100644
index 00000000..58e946ae
--- /dev/null
+++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostDroolsBeanTest.java
@@ -0,0 +1,65 @@
+/*
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software 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.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * 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.
+ *
+ * ============LICENSE_END============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.core.command;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class PostDroolsBeanTest {
+
+ public PostDroolsBean mockPostDroolsBean() {
+ PostDroolsBean mockpostDroolsBean = new PostDroolsBean();
+ mockpostDroolsBean.setDroolsFile("testFile");
+ mockpostDroolsBean.setClassName("testClass");
+ mockpostDroolsBean.setSelectedRules("testRules");
+ return mockpostDroolsBean;
+ }
+
+ @Test
+ public void postDroolsBeanTest() {
+ PostDroolsBean mockpostDroolsBean = mockPostDroolsBean();
+ PostDroolsBean postDroolsBean = new PostDroolsBean();
+ postDroolsBean.setDroolsFile("testFile");
+ postDroolsBean.setClassName("testClass");
+ postDroolsBean.setSelectedRules("testRules");
+ assertEquals(postDroolsBean.getDroolsFile(), mockpostDroolsBean.getDroolsFile());
+ assertEquals(postDroolsBean.getClassName(), mockpostDroolsBean.getClassName());
+ assertEquals(postDroolsBean.getSelectedRules(), mockpostDroolsBean.getSelectedRules());
+ }
+}
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostSearchBeanTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostSearchBeanTest.java
new file mode 100644
index 00000000..b5bc3477
--- /dev/null
+++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/PostSearchBeanTest.java
@@ -0,0 +1,193 @@
+/*
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software 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.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * 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.
+ *
+ * ============LICENSE_END============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.core.command;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class PostSearchBeanTest {
+
+
+ public PostSearchBean mockPostSearchBean()
+ {
+ PostSearchBean postSearchBean= new PostSearchBean();
+// postSearchBean.setUser(null);
+// postSearchBean.setUserOrig(null);
+ postSearchBean.setSelected(new String[] {"testSelected"});
+ postSearchBean.setPostHrid(new String[] {"testPostHrid"});
+ postSearchBean.setPostOrgUserId(new String[] {"testPostOrgUserId"});
+ postSearchBean.setPostFirstName(new String[] {"testPostFirstName"});
+ postSearchBean.setPostLastName(new String[] {"testPostLastName"});
+ postSearchBean.setPostOrgCode(new String[] {"testPostOrgCode"});
+ postSearchBean.setPostPhone(new String[] {"testPostPhone"});
+ postSearchBean.setPostEmail(new String[] {"testPostEmail"});
+ postSearchBean.setPostAddress1(new String[] {"testPostAddress1"});
+ postSearchBean.setPostAddress2(new String[] {"testPostAddress2"});
+ postSearchBean.setPostCity(new String[] {"testPostCity"});
+ postSearchBean.setPostState(new String[] {"testPostState"});
+ postSearchBean.setPostZipCode(new String[] {"testPostZipCode"});
+ postSearchBean.setPostLocationClli(new String[] {"testPostLocationClli"});
+ postSearchBean.setPostBusinessCountryCode(new String[] {"testPostBusinessCountryCode"});
+ postSearchBean.setPostBusinessCountryName(new String[] {"testPostBusinessCountryName"});
+ postSearchBean.setPostDepartment(new String[] {"testPostDepartment"});
+ postSearchBean.setPostDepartmentName(new String[] {"testPostDepartmentName"});
+ postSearchBean.setPostBusinessUnit(new String[] {"testPostBusinessUnit"});
+ postSearchBean.setPostBusinessUnitName(new String[] {"testPostBusinessUnitName"});
+ postSearchBean.setPostJobTitle(new String[] {"testPostJobTitle"});
+ postSearchBean.setPostOrgManagerUserId(new String[] {"testPostOrgManagerUserId"});
+ postSearchBean.setPostCommandChain(new String[] {"testPostCommandChain"});
+ postSearchBean.setPostCompanyCode(new String[] {"testPostCompanyCode"});
+ postSearchBean.setPostCompany(new String[] {"testPostCompany"});
+ postSearchBean.setPostCostCenter(new String[] {"testPostCostCenter"});
+ postSearchBean.setPostSiloStatus(new String[] {"testPostSiloStatus"});
+ postSearchBean.setPostFinancialLocCode(new String[] {"testPostFinancialLocCode"});
+ postSearchBean.setFirstName("testFirstName");
+ postSearchBean.setLastName("testLastName");
+ postSearchBean.setHrid("testHrid");
+ postSearchBean.setOrgUserId("testOrgUserID");
+ postSearchBean.setOrgCode("testOrgCode");
+ postSearchBean.setEmail("testEmail");
+ postSearchBean.setOrgManagerUserId("testOrgManagerUserId");
+ postSearchBean.setFirstNameOrig("testFirstNameOrig");
+ postSearchBean.setLastNameOrig("testLastNameOrig");
+ postSearchBean.setHridOrig("testHridOrig");
+ postSearchBean.setOrgUserIdOrig("testOrgUserIdOrig");
+ postSearchBean.setOrgCodeOrig("testOrgCodeOrig");
+ postSearchBean.setEmailOrig("testEmailOrig");
+ postSearchBean.setOrgManagerUserIdOrig("testOrgManagerUserIdOrig");
+
+ return postSearchBean;
+ }
+
+ @Test
+ public void postSearchBeanTest()
+ {
+
+ PostSearchBean mockPostSearchBean= mockPostSearchBean();
+ PostSearchBean postSearchBean= new PostSearchBean();
+// postSearchBean.setUser(null);
+// postSearchBean.setUserOrig(null);
+ postSearchBean.setSelected(new String[] {"testSelected"});
+ postSearchBean.setPostHrid(new String[] {"testPostHrid"});
+ postSearchBean.setPostOrgUserId(new String[] {"testPostOrgUserId"});
+ postSearchBean.setPostFirstName(new String[] {"testPostFirstName"});
+ postSearchBean.setPostLastName(new String[] {"testPostLastName"});
+ postSearchBean.setPostOrgCode(new String[] {"testPostOrgCode"});
+ postSearchBean.setPostPhone(new String[] {"testPostPhone"});
+ postSearchBean.setPostEmail(new String[] {"testPostEmail"});
+ postSearchBean.setPostAddress1(new String[] {"testPostAddress1"});
+ postSearchBean.setPostAddress2(new String[] {"testPostAddress2"});
+ postSearchBean.setPostCity(new String[] {"testPostCity"});
+ postSearchBean.setPostState(new String[] {"testPostState"});
+ postSearchBean.setPostZipCode(new String[] {"testPostZipCode"});
+ postSearchBean.setPostLocationClli(new String[] {"testPostLocationClli"});
+ postSearchBean.setPostBusinessCountryCode(new String[] {"testPostBusinessCountryCode"});
+ postSearchBean.setPostBusinessCountryName(new String[] {"testPostBusinessCountryName"});
+ postSearchBean.setPostDepartment(new String[] {"testPostDepartment"});
+ postSearchBean.setPostDepartmentName(new String[] {"testPostDepartmentName"});
+ postSearchBean.setPostBusinessUnit(new String[] {"testPostBusinessUnit"});
+ postSearchBean.setPostBusinessUnitName(new String[] {"testPostBusinessUnitName"});
+ postSearchBean.setPostJobTitle(new String[] {"testPostJobTitle"});
+ postSearchBean.setPostOrgManagerUserId(new String[] {"testPostOrgManagerUserId"});
+ postSearchBean.setPostCommandChain(new String[] {"testPostCommandChain"});
+ postSearchBean.setPostCompanyCode(new String[] {"testPostCompanyCode"});
+ postSearchBean.setPostCompany(new String[] {"testPostCompany"});
+ postSearchBean.setPostCostCenter(new String[] {"testPostCostCenter"});
+ postSearchBean.setPostSiloStatus(new String[] {"testPostSiloStatus"});
+ postSearchBean.setPostFinancialLocCode(new String[] {"testPostFinancialLocCode"});
+ postSearchBean.setFirstName("testFirstName");
+ postSearchBean.setLastName("testLastName");
+ postSearchBean.setHrid("testHrid");
+ postSearchBean.setOrgUserId("testOrgUserID");
+ postSearchBean.setOrgCode("testOrgCode");
+ postSearchBean.setEmail("testEmail");
+ postSearchBean.setOrgManagerUserId("testOrgManagerUserId");
+ postSearchBean.setFirstNameOrig("testFirstNameOrig");
+ postSearchBean.setLastNameOrig("testLastNameOrig");
+ postSearchBean.setHridOrig("testHridOrig");
+ postSearchBean.setOrgUserIdOrig("testOrgUserIdOrig");
+ postSearchBean.setOrgCodeOrig("testOrgCodeOrig");
+ postSearchBean.setEmailOrig("testEmailOrig");
+ postSearchBean.setOrgManagerUserIdOrig("testOrgManagerUserIdOrig");
+ assertNull(postSearchBean.getUser().getCity());
+ assertNull(postSearchBean.getUserOrig().getCity());
+ assertEquals(postSearchBean.getSelected().length, mockPostSearchBean.getSelected().length);
+ assertEquals(postSearchBean.getPostHrid().length, mockPostSearchBean.getPostHrid().length);
+ assertEquals(postSearchBean.getPostOrgUserId().length, mockPostSearchBean.getPostOrgUserId().length);
+ assertEquals(postSearchBean.getPostFirstName().length,mockPostSearchBean.getPostFirstName().length);
+ assertEquals(postSearchBean.getPostLastName().length,mockPostSearchBean.getPostLastName().length);
+ assertEquals(postSearchBean.getPostOrgCode().length,mockPostSearchBean.getPostOrgCode().length);
+ assertEquals(postSearchBean.getPostPhone().length,mockPostSearchBean.getPostPhone().length);
+ assertEquals(postSearchBean.getPostEmail().length,mockPostSearchBean.getPostEmail().length);
+ assertEquals(postSearchBean.getPostAddress1().length,mockPostSearchBean.getPostAddress1().length);
+ assertEquals(postSearchBean.getPostAddress2().length,mockPostSearchBean.getPostAddress2().length);
+ assertEquals(postSearchBean.getPostCity().length,mockPostSearchBean.getPostCity().length);
+ assertEquals(postSearchBean.getPostState().length,mockPostSearchBean.getPostState().length);
+ assertEquals(postSearchBean.getPostZipCode().length,mockPostSearchBean.getPostZipCode().length);
+ assertEquals(postSearchBean.getPostLocationClli().length,mockPostSearchBean.getPostLocationClli().length);
+ assertEquals(postSearchBean.getPostBusinessCountryCode().length,mockPostSearchBean.getPostBusinessCountryCode().length);
+ assertEquals(postSearchBean.getPostBusinessCountryName().length,mockPostSearchBean.getPostBusinessCountryName().length);
+ assertEquals(postSearchBean.getPostDepartment().length,mockPostSearchBean.getPostDepartment().length);
+ assertEquals(postSearchBean.getPostDepartmentName().length,mockPostSearchBean.getPostDepartmentName().length);
+ assertEquals(postSearchBean.getPostBusinessUnit().length,mockPostSearchBean.getPostBusinessUnit().length);
+ assertEquals(postSearchBean.getPostBusinessUnitName().length,mockPostSearchBean.getPostBusinessUnitName().length);
+ assertEquals(postSearchBean.getPostJobTitle().length,mockPostSearchBean.getPostJobTitle().length);
+ assertEquals(postSearchBean.getPostOrgManagerUserId().length,mockPostSearchBean.getPostOrgManagerUserId().length);
+ assertEquals(postSearchBean.getPostCommandChain().length,mockPostSearchBean.getPostCommandChain().length);
+ assertEquals(postSearchBean.getPostCompanyCode().length,mockPostSearchBean.getPostCompanyCode().length);
+ assertEquals(postSearchBean.getPostCompany().length,mockPostSearchBean.getPostCompany().length);
+ assertEquals(postSearchBean.getPostCostCenter().length,mockPostSearchBean.getPostCostCenter().length);
+ assertEquals(postSearchBean.getPostSiloStatus().length,mockPostSearchBean.getPostSiloStatus().length);
+ assertEquals(postSearchBean.getPostFinancialLocCode().length,mockPostSearchBean.getPostFinancialLocCode().length);
+ assertEquals(postSearchBean.getFirstName(),mockPostSearchBean.getFirstName());
+ assertEquals(postSearchBean.getLastName(),mockPostSearchBean.getLastName());
+ assertEquals(postSearchBean.getHrid(),mockPostSearchBean.getHrid());
+ assertEquals(postSearchBean.getOrgCode(),mockPostSearchBean.getOrgCode());
+ assertEquals(postSearchBean.getEmail(),mockPostSearchBean.getEmail());
+ assertEquals(postSearchBean.getOrgManagerUserId(),mockPostSearchBean.getOrgManagerUserId());
+ assertEquals(postSearchBean.getFirstNameOrig(),mockPostSearchBean.getFirstNameOrig());
+ assertEquals(postSearchBean.getLastNameOrig(),mockPostSearchBean.getLastNameOrig());
+ assertEquals(postSearchBean.getHridOrig(),mockPostSearchBean.getHridOrig());
+ assertEquals(postSearchBean.getOrgUserIdOrig(),mockPostSearchBean.getOrgUserIdOrig());
+ assertEquals(postSearchBean.getOrgCodeOrig(),mockPostSearchBean.getOrgCodeOrig());
+ assertEquals(postSearchBean.getEmailOrig(),mockPostSearchBean.getEmailOrig());
+ assertEquals(postSearchBean.getOrgManagerUserIdOrig(),mockPostSearchBean.getOrgManagerUserIdOrig());
+
+ }
+}
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/UserRowBeanTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/UserRowBeanTest.java
new file mode 100644
index 00000000..78c139e0
--- /dev/null
+++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/UserRowBeanTest.java
@@ -0,0 +1,76 @@
+/*
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software 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.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * 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.
+ *
+ * ============LICENSE_END============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.core.command;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class UserRowBeanTest {
+
+ public UserRowBean mockUserRowBean()
+ {
+ UserRowBean userRowBean = new UserRowBean();
+ userRowBean.setSessionId("testSessionId");
+ userRowBean.setLastAccess("testLastAccess");
+ userRowBean.setRemaining("testRemaining");
+ userRowBean.setLoginTime("testLoginTime");
+ userRowBean.setLastLoginTime("testLastLoginTime");
+ return userRowBean;
+ }
+
+ @Test
+ public void userRowBeanTest()
+ {
+ UserRowBean mockUserRowBean = mockUserRowBean();
+ UserRowBean userRowBean = new UserRowBean();
+ userRowBean.setSessionId("testSessionId");
+ userRowBean.setLastAccess("testLastAccess");
+ userRowBean.setRemaining("testRemaining");
+ userRowBean.setLoginTime("testLoginTime");
+ userRowBean.setLastLoginTime("testLastLoginTime");
+
+ assertEquals(userRowBean.getSessionId(),mockUserRowBean.getSessionId());
+ assertEquals(userRowBean.getLastAccess(),mockUserRowBean.getLastAccess());
+ assertEquals(userRowBean.getRemaining(),mockUserRowBean.getRemaining());
+ assertEquals(userRowBean.getLoginTime(),mockUserRowBean.getLoginTime());
+ assertEquals(userRowBean.getLastLoginTime(),mockUserRowBean.getLastLoginTime());
+
+
+ }
+}
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/support/SearchResultTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/support/SearchResultTest.java
new file mode 100644
index 00000000..5f49cf09
--- /dev/null
+++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/command/support/SearchResultTest.java
@@ -0,0 +1,76 @@
+/*
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software 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.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * 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.
+ *
+ * ============LICENSE_END============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.core.command.support;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class SearchResultTest {
+
+ public SearchResult mockSearchResult(){
+
+ SearchResult SearchResult = new SearchResult();
+
+ SearchResult.setAccessType("test");
+ SearchResult.setDataSize(1);
+ SearchResult.setPageNo(1);
+ SearchResult.setPageSize(1);
+
+ return SearchResult;
+ }
+
+ @Test
+ public void searchResultTest(){
+ SearchResult searchResult1 = mockSearchResult();
+
+ SearchResult SearchResult = new SearchResult();
+
+ SearchResult.setAccessType("test");
+ SearchResult.setDataSize(1);
+ SearchResult.setPageNo(1);
+ SearchResult.setPageSize(1);
+
+ assertEquals(SearchResult.getAccessType(), searchResult1.getAccessType());
+ assertEquals(SearchResult.getDataSize(), searchResult1.getDataSize());
+ assertEquals(SearchResult.getPageNo(), searchResult1.getPageNo());
+ assertEquals(SearchResult.getPageSize(), searchResult1.getPageSize());
+ assertEquals(SearchResult.getSize(), searchResult1.getSize());
+
+ }
+}