Fixed: Partymgr Groovy tests (OFBIZ-12998)
Fix auto refactor by eclipse IDE, sorry for that.
diff --git a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/ContactMechWorkerTests.groovy b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/ContactMechWorkerTests.groovy
index c25b425..45a1e45 100644
--- a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/ContactMechWorkerTests.groovy
+++ b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/ContactMechWorkerTests.groovy
@@ -34,9 +34,10 @@
assert partyContactMechValueMaps
assert partyContactMechValueMaps.size() == 7
boolean foundPostalAddress = false, foundTelecom = false, foundEmailAddress = false, foundFtpAddress = false
- partyContactMechValueMaps.forEach { Map partyContactMechValueMap ->
- switch (partyContactMechValueMap?.contactMech?.contactMechId) {
- case '9015':
+ partyContactMechValueMaps.forEach {
+ Map partyContactMechValueMap ->
+ switch (partyContactMechValueMap?.contactMech?.contactMechId) {
+ case '9015':
foundPostalAddress = true
assert partyContactMechValueMap.contactMech.contactMechTypeId == 'POSTAL_ADDRESS'
assert partyContactMechValueMap.partyContactMech
@@ -47,7 +48,7 @@
assert partyContactMechValueMap.postalAddress.contactMechId == '9015'
assert partyContactMechValueMap.postalAddress.address1 == '2004 Factory Blvd'
break
- case '9027':
+ case '9027':
foundTelecom = true
assert partyContactMechValueMap.contactMech.contactMechTypeId == 'TELECOM_NUMBER'
assert partyContactMechValueMap.partyContactMech
@@ -58,7 +59,7 @@
assert partyContactMechValueMap.telecomNumber.contactMechId == '9027'
assert partyContactMechValueMap.telecomNumber.contactNumber == '444-4444'
break
- case '9126':
+ case '9126':
foundEmailAddress = true
assert partyContactMechValueMap.contactMech.contactMechTypeId == 'EMAIL_ADDRESS'
assert partyContactMechValueMap.contactMech.infoString == 'ofbiztest@foo.com'
@@ -67,7 +68,7 @@
assert partyContactMechValueMap.partyContactMechPurposes
assert partyContactMechValueMap.partyContactMechPurposes.size() == 2
break
- case '9127':
+ case '9127':
foundFtpAddress = true
assert partyContactMechValueMap.contactMech.contactMechTypeId == 'FTP_ADDRESS'
assert partyContactMechValueMap.partyContactMech
@@ -76,7 +77,7 @@
assert partyContactMechValueMap.ftpAddress
assert partyContactMechValueMap.ftpAddress.hostname == 'ftp://apacheofbiz.foo.com'
break
- }
+ }
}
assert foundPostalAddress && foundTelecom && foundEmailAddress && foundFtpAddress
@@ -176,4 +177,5 @@
}
assert foundPostalAddress && foundEmail && foundPhone
}
+
}
diff --git a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyContactMechTests.groovy b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyContactMechTests.groovy
index 28efb2e..b373200 100644
--- a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyContactMechTests.groovy
+++ b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyContactMechTests.groovy
@@ -36,11 +36,11 @@
// first try with just updating without changing the email address
Map serviceCtx = [
- partyId: partyId,
- contactMechTypeId: contactMechTypeId,
- emailAddress: emailAddress,
- contactMechId: '9026',
- userLogin: userLogin
+ partyId: partyId,
+ contactMechTypeId: contactMechTypeId,
+ emailAddress: emailAddress,
+ contactMechId: '9026',
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('updatePartyEmailAddress', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -76,12 +76,12 @@
// first try with just updating without changing the email address
Map serviceCtx = [
- partyId: partyId,
- contactMechId: '9025',
- countryCode: '1',
- areaCode: '801',
- contactNumber: '555-5555',
- userLogin: userLogin
+ partyId: partyId,
+ contactMechId: '9025',
+ countryCode: '1',
+ areaCode: '801',
+ contactNumber: '555-5555',
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('updatePartyTelecomNumber', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -184,10 +184,10 @@
String contactMechPurposeTypeId = 'PRIMARY_EMAIL'
Map serviceCtx = [
- partyId: partyId,
- contactMechPurposeTypeId: contactMechPurposeTypeId,
- emailAddress: emailAddress,
- userLogin: userLogin
+ partyId: partyId,
+ contactMechPurposeTypeId: contactMechPurposeTypeId,
+ emailAddress: emailAddress,
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('createPartyEmailAddress', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -223,11 +223,11 @@
String contactMechPurposeTypeId = 'PRIMARY_PHONE'
Map serviceCtx = [
- partyId: partyId,
- contactMechPurposeTypeId: contactMechPurposeTypeId,
- areaCode: areaCode,
- contactNumber: contactNumber,
- userLogin: userLogin
+ partyId: partyId,
+ contactMechPurposeTypeId: contactMechPurposeTypeId,
+ areaCode: areaCode,
+ contactNumber: contactNumber,
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('createPartyTelecomNumber', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -267,12 +267,12 @@
String extension = '444'
Map serviceCtx = [
- partyId: partyId,
- contactMechPurposeTypeId: contactMechPurposeTypeId,
- areaCode: areaCode,
- contactNumber: contactNumber,
- extension: extension,
- userLogin: userLogin
+ partyId: partyId,
+ contactMechPurposeTypeId: contactMechPurposeTypeId,
+ areaCode: areaCode,
+ contactNumber: contactNumber,
+ extension: extension,
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('createUpdatePartyTelecomNumber', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -312,12 +312,12 @@
String contactNumber = '555-5555'
Map serviceCtx = [
- partyId: partyId,
- contactMechId: '9125',
- contactMechPurposeTypeId: contactMechPurposeTypeId,
- areaCode: areaCode,
- contactNumber: contactNumber,
- userLogin: userLogin
+ partyId: partyId,
+ contactMechId: '9125',
+ contactMechPurposeTypeId: contactMechPurposeTypeId,
+ areaCode: areaCode,
+ contactNumber: contactNumber,
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('createUpdatePartyTelecomNumber', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -360,10 +360,10 @@
String emailAddress = 'demo.customer@foo.com'
Map serviceCtx = [
- partyId: partyId,
- contactMechPurposeTypeId: contactMechPurposeTypeId,
- emailAddress: emailAddress,
- userLogin: userLogin
+ partyId: partyId,
+ contactMechPurposeTypeId: contactMechPurposeTypeId,
+ emailAddress: emailAddress,
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('createUpdatePartyEmailAddress', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -394,11 +394,11 @@
String emailAddress = 'demo.customer@foo.com'
Map serviceCtx = [
- partyId: partyId,
- contactMechId: '9126',
- contactMechPurposeTypeId: contactMechPurposeTypeId,
- emailAddress: emailAddress,
- userLogin: userLogin
+ partyId: partyId,
+ contactMechId: '9126',
+ contactMechPurposeTypeId: contactMechPurposeTypeId,
+ emailAddress: emailAddress,
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('createUpdatePartyEmailAddress', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -430,4 +430,5 @@
.filterByDate().queryFirst()
assert partyContactMechPurpose
}
+
}
diff --git a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyStatusChangeTests.groovy b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyStatusChangeTests.groovy
index 442f3ba..75c6bb3 100644
--- a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyStatusChangeTests.groovy
+++ b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyStatusChangeTests.groovy
@@ -35,10 +35,10 @@
String statusId = 'PARTY_DISABLED'
Map serviceCtx = [
- partyId: partyId,
- statusId: statusId,
- statusDate: UtilDateTime.nowTimestamp(),
- userLogin: userLogin
+ partyId: partyId,
+ statusId: statusId,
+ statusDate: UtilDateTime.nowTimestamp(),
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('setPartyStatus', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -57,10 +57,10 @@
String statusId = 'PARTY_ENABLED'
Map serviceCtx = [
- partyId: partyId,
- statusId: statusId,
- statusDate: UtilDateTime.nowTimestamp(),
- userLogin: userLogin
+ partyId: partyId,
+ statusId: statusId,
+ statusDate: UtilDateTime.nowTimestamp(),
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('setPartyStatus', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -72,4 +72,5 @@
assert statusId == party.statusId
assert serviceResult.oldStatusId == 'PARTY_DISABLED'
}
+
}
diff --git a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyTests.groovy b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyTests.groovy
index a289481..4611f7b 100644
--- a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyTests.groovy
+++ b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyTests.groovy
@@ -30,15 +30,15 @@
void testCreatePartyPostalAddress() {
Map serviceCtx = [
- contactMechId: 'TestPostalAddress',
- partyId: 'TestCustomer',
- toName: 'Test Address',
- address1: '2004 Factory Blvd',
- city: 'City of Industry',
- countryGeoId: 'USA',
- stateProvinceGeoId: 'CA',
- postalCode: '90000',
- userLogin: userLogin
+ contactMechId: 'TestPostalAddress',
+ partyId: 'TestCustomer',
+ toName: 'Test Address',
+ address1: '2004 Factory Blvd',
+ city: 'City of Industry',
+ countryGeoId: 'USA',
+ stateProvinceGeoId: 'CA',
+ postalCode: '90000',
+ userLogin: userLogin
]
Map serviceResult = dispatcher.runSync('createPartyPostalAddress', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
@@ -47,4 +47,5 @@
assert postalAddress != null
postalAddress.city = 'City of Industry'
}
+
}