summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/test
diff options
context:
space:
mode:
authorManoop Talasila <talasila@research.att.com>2019-08-28 18:49:14 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-28 18:49:14 +0000
commitbe89a5570691d36bf2b8b12035f81d5c85de3e70 (patch)
tree4605c46c08ff3d805b47a1b6bd3744821c9c6612 /ecomp-portal-BE-common/src/test
parent60ec30b5f8480da7f525da5e6a9b9e2070100f1b (diff)
parenteb34f877f352e8d9cd8f2e62693a2692e7f62dc3 (diff)
Merge "Reduce number of parameters in constructor"
Diffstat (limited to 'ecomp-portal-BE-common/src/test')
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java46
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralV2UserTest.java23
2 files changed, 41 insertions, 28 deletions
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java
index 28292ba6..5291c0dd 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java
@@ -62,15 +62,20 @@ public class CentralUserTest {
public CentralV2User mockCentralUser(){
Set<CentralV2UserApp> userApps = new HashSet<CentralV2UserApp>();
Set<CentralV2Role> pseudoRoles = new HashSet<CentralV2Role>();
- CentralV2User centralV2User = new CentralV2User((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
- (long)1, "test", "test", "test", "test", "test",
- "test", "test", (long)1, "test", "test", "test",
- "test", "test", "test", "test", "test", "test", "test",
- "test", "test", "test", "test",
- "test", "test", "test", "test", "test",
- "test", "test", "test", "test", "test",
- "test", "test", "test", "test", null,
- false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
+ CentralV2User centralV2User = new CentralV2User.CentralV2UserBuilder().setId((long) 1).setCreated(null)
+ .setModified(null).setCreatedId((long) 1).setModifiedId((long) 1).setRowNum((long) 1).setOrgId((long) 1)
+ .setManagerId((long) 1).setFirstName("test").setMiddleInitial("test").setLastName("test")
+ .setPhone("test").setFax("test").setCellular("test").setEmail("test").setAddressId((long) 1)
+ .setAlertMethodCd("test").setHrid("test").setOrgUserId("test").setOrgCode("test").setAddress1("test")
+ .setAddress2("test").setCity("test").setState("test").setZipCode("test").setCountry("test")
+ .setOrgManagerUserId("test").setLocationClli("test").setBusinessCountryCode("test")
+ .setBusinessCountryName("test").setBusinessUnit("test").setBusinessUnitName("test")
+ .setDepartment("test").setDepartmentName("test").setCompanyCode("test").setCompany("test")
+ .setZipCodeSuffix("test").setJobTitle("test").setCommandChain("test").setSiloStatus("test")
+ .setCostCenter("test").setFinancialLocCode("test").setLoginId("test").setLoginPwd("test")
+ .setLastLoginDate(null).setActive(false).setInternal(false).setSelectedProfileId((long) 1)
+ .setTimeZoneId((long) 1).setOnline(false).setChatId("test").setUserApps(userApps)
+ .setPseudoRoles(pseudoRoles).createCentralV2User();
return centralV2User;
}
@@ -81,15 +86,20 @@ public class CentralUserTest {
Set<CentralV2UserApp> userApps = new HashSet<CentralV2UserApp>();
Set<CentralV2Role> pseudoRoles = new HashSet<CentralV2Role>();
- CentralV2User centralV2User1 = new CentralV2User((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
- (long)1, "test", "test", "test", "test", "test",
- "test", "test", (long)1, "test", "test", "test",
- "test", "test", "test", "test", "test", "test", "test",
- "test", "test", "test", "test",
- "test", "test", "test", "test", "test",
- "test", "test", "test", "test", "test",
- "test", "test", "test", "test", null,
- false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
+ CentralV2User centralV2User1 = new CentralV2User.CentralV2UserBuilder().setId((long) 1).setCreated(null)
+ .setModified(null).setCreatedId((long) 1).setModifiedId((long) 1).setRowNum((long) 1).setOrgId((long) 1)
+ .setManagerId((long) 1).setFirstName("test").setMiddleInitial("test").setLastName("test")
+ .setPhone("test").setFax("test").setCellular("test").setEmail("test").setAddressId((long) 1)
+ .setAlertMethodCd("test").setHrid("test").setOrgUserId("test").setOrgCode("test").setAddress1("test")
+ .setAddress2("test").setCity("test").setState("test").setZipCode("test").setCountry("test")
+ .setOrgManagerUserId("test").setLocationClli("test").setBusinessCountryCode("test")
+ .setBusinessCountryName("test").setBusinessUnit("test").setBusinessUnitName("test")
+ .setDepartment("test").setDepartmentName("test").setCompanyCode("test").setCompany("test")
+ .setZipCodeSuffix("test").setJobTitle("test").setCommandChain("test").setSiloStatus("test")
+ .setCostCenter("test").setFinancialLocCode("test").setLoginId("test").setLoginPwd("test")
+ .setLastLoginDate(null).setActive(false).setInternal(false).setSelectedProfileId((long) 1)
+ .setTimeZoneId((long) 1).setOnline(false).setChatId("test").setUserApps(userApps)
+ .setPseudoRoles(pseudoRoles).createCentralV2User();
assertEquals(centralV2User, centralV2User1);
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralV2UserTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralV2UserTest.java
index 0f7da0a1..81650bdd 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralV2UserTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralV2UserTest.java
@@ -61,7 +61,7 @@ public class CentralV2UserTest {
CentralV2User user=buildV2User();
user.setZipCodeSuffix(TEST);
- CentralV2User centrlUser=new CentralV2User();
+ CentralV2User centrlUser = new CentralV2User.CentralV2UserBuilder().createCentralV2User();
centrlUser.setId(user.getId());
centrlUser.setCreated(user.getCreated());
centrlUser.setModified(user.getModified());
@@ -249,15 +249,18 @@ public class CentralV2UserTest {
public CentralV2User buildV2User(){
Set<CentralV2UserApp> userApps = new HashSet<CentralV2UserApp>();
Set<CentralV2Role> pseudoRoles = new HashSet<CentralV2Role>();
- CentralV2User centralV2User = new CentralV2User(ID, DATE, DATE, ID, ID, ID, ID,
- ID, TEST, TEST, TEST, TEST, TEST,
- TEST, TEST, ID, TEST, TEST, TEST,
- TEST, TEST, TEST, TEST, TEST, TEST, TEST,
- TEST, TEST, TEST, TEST,
- TEST, TEST, TEST, TEST, TEST,
- TEST, TEST, TEST, TEST, TEST,
- TEST, TEST, TEST, TEST, null,
- false, false, ID, ID, false, TEST, userApps, pseudoRoles);
+ CentralV2User centralV2User = new CentralV2User.CentralV2UserBuilder().setId(ID).setCreated(DATE)
+ .setModified(DATE).setCreatedId(ID).setModifiedId(ID).setRowNum(ID).setOrgId(ID).setManagerId(ID)
+ .setFirstName(TEST).setMiddleInitial(TEST).setLastName(TEST).setPhone(TEST).setFax(TEST)
+ .setCellular(TEST).setEmail(TEST).setAddressId(ID).setAlertMethodCd(TEST).setHrid(TEST)
+ .setOrgUserId(TEST).setOrgCode(TEST).setAddress1(TEST).setAddress2(TEST).setCity(TEST).setState(TEST)
+ .setZipCode(TEST).setCountry(TEST).setOrgManagerUserId(TEST).setLocationClli(TEST)
+ .setBusinessCountryCode(TEST).setBusinessCountryName(TEST).setBusinessUnit(TEST)
+ .setBusinessUnitName(TEST).setDepartment(TEST).setDepartmentName(TEST).setCompanyCode(TEST)
+ .setCompany(TEST).setZipCodeSuffix(TEST).setJobTitle(TEST).setCommandChain(TEST).setSiloStatus(TEST)
+ .setCostCenter(TEST).setFinancialLocCode(TEST).setLoginId(TEST).setLoginPwd(TEST).setLastLoginDate(null)
+ .setActive(false).setInternal(false).setSelectedProfileId(ID).setTimeZoneId(ID).setOnline(false)
+ .setChatId(TEST).setUserApps(userApps).setPseudoRoles(pseudoRoles).createCentralV2User();
return centralV2User;
}