Compare commits
No commits in common. "c30fe63d7ff795cc3631c8c158976b9c24454afc" and "e15d82ac9c74d5bf82ba91badaae125f5c61cd0e" have entirely different histories.
c30fe63d7f
...
e15d82ac9c
@ -77,6 +77,7 @@ public class HsOfficeCoopAssetsTransactionController implements HsOfficeCoopAsse
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
|
||||
public ResponseEntity<HsOfficeCoopAssetsTransactionResource> getCoopAssetTransactionByUuid(
|
||||
final String currentSubject, final String assumedRoles, final UUID assetTransactionUuid) {
|
||||
|
||||
|
@ -34,8 +34,8 @@ public class HsOfficeMembershipController implements HsOfficeMembershipsApi {
|
||||
public ResponseEntity<List<HsOfficeMembershipResource>> listMemberships(
|
||||
final String currentSubject,
|
||||
final String assumedRoles,
|
||||
final UUID partnerUuid,
|
||||
final Integer memberNumber) {
|
||||
UUID partnerUuid,
|
||||
Integer memberNumber) {
|
||||
context.define(currentSubject, assumedRoles);
|
||||
|
||||
final var entities = ( memberNumber != null)
|
||||
|
@ -52,11 +52,11 @@ components:
|
||||
HsBookingItemInsert:
|
||||
type: object
|
||||
properties:
|
||||
project.uuid:
|
||||
projectUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
parentItem.uuid:
|
||||
parentItemUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
@ -77,7 +77,7 @@ components:
|
||||
$ref: '../hs-hosting/hs-hosting-asset-schemas.yaml#/components/schemas/HsHostingAssetAutoInsert'
|
||||
required:
|
||||
- caption
|
||||
- project.uuid
|
||||
- projectUuid
|
||||
- validFrom
|
||||
- resources
|
||||
additionalProperties: false
|
||||
|
@ -25,7 +25,7 @@ components:
|
||||
HsBookingProjectInsert:
|
||||
type: object
|
||||
properties:
|
||||
debitor.uuid:
|
||||
debitorUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
@ -35,6 +35,6 @@ components:
|
||||
maxLength: 80
|
||||
nullable: false
|
||||
required:
|
||||
- debitor.uuid
|
||||
- debitorUuid
|
||||
- caption
|
||||
additionalProperties: false
|
||||
|
@ -54,7 +54,7 @@ components:
|
||||
caption:
|
||||
type: string
|
||||
nullable: true
|
||||
alarmContact.uuid:
|
||||
alarmContactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -64,11 +64,11 @@ components:
|
||||
HsHostingAssetInsert:
|
||||
type: object
|
||||
properties:
|
||||
bookingItem.uuid:
|
||||
bookingItemUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
parentAsset.uuid:
|
||||
parentAssetUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -84,7 +84,7 @@ components:
|
||||
minLength: 3
|
||||
maxLength: 80
|
||||
nullable: false
|
||||
alarmContact.uuid:
|
||||
alarmContactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -99,11 +99,11 @@ components:
|
||||
HsHostingAssetAutoInsert:
|
||||
type: object
|
||||
properties:
|
||||
parentAsset.uuid:
|
||||
parentAssetUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
assignedToAsset.uuid:
|
||||
assignedToAssetUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
type:
|
||||
@ -118,7 +118,7 @@ components:
|
||||
minLength: 3
|
||||
maxLength: 80
|
||||
nullable: false
|
||||
alarmContact.uuid:
|
||||
alarmContactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -147,10 +147,10 @@ components:
|
||||
minLength: 3
|
||||
maxLength: 80
|
||||
nullable: false
|
||||
assignedToAsset.uuid:
|
||||
assignedToAssetUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
alarmContact.uuid:
|
||||
alarmContactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
|
@ -62,7 +62,7 @@ components:
|
||||
HsOfficeCoopAssetsTransactionInsert:
|
||||
type: object
|
||||
properties:
|
||||
membership.uuid:
|
||||
membershipUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
@ -80,11 +80,11 @@ components:
|
||||
maxLength: 48
|
||||
comment:
|
||||
type: string
|
||||
reverseEntry.uuid:
|
||||
reverseEntryUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
required:
|
||||
- membership.uuid
|
||||
- membershipUuid
|
||||
- transactionType
|
||||
- assetValue
|
||||
- valueDate
|
||||
|
@ -56,7 +56,7 @@ components:
|
||||
HsOfficeCoopSharesTransactionInsert:
|
||||
type: object
|
||||
properties:
|
||||
membership.uuid:
|
||||
membershipUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
@ -73,11 +73,11 @@ components:
|
||||
maxLength: 48
|
||||
comment:
|
||||
type: string
|
||||
adjustedShareTx.uuid:
|
||||
adjustedShareTxUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
required:
|
||||
- membership.uuid
|
||||
- membershipUuid
|
||||
- transactionType
|
||||
- shareCount
|
||||
- valueDate
|
||||
|
@ -41,7 +41,7 @@ components:
|
||||
HsOfficeDebitorPatch:
|
||||
type: object
|
||||
properties:
|
||||
debitorRel.uuid:
|
||||
debitorRelUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -61,7 +61,7 @@ components:
|
||||
vatReverseCharge:
|
||||
type: boolean
|
||||
nullable: false
|
||||
refundBankAccount.uuid:
|
||||
refundBankAccountUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -75,7 +75,7 @@ components:
|
||||
properties:
|
||||
debitorRel:
|
||||
$ref: 'hs-office-relation-schemas.yaml#/components/schemas/HsOfficeRelationSubInsert'
|
||||
debitorRel.uuid:
|
||||
debitorRelUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
debitorNumberSuffix:
|
||||
@ -92,7 +92,7 @@ components:
|
||||
type: boolean
|
||||
vatReverseCharge:
|
||||
type: boolean
|
||||
refundBankAccount.uuid:
|
||||
refundBankAccountUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
defaultPrefix:
|
||||
|
@ -62,7 +62,7 @@ components:
|
||||
HsOfficeMembershipInsert:
|
||||
type: object
|
||||
properties:
|
||||
partner.uuid:
|
||||
partnerUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
@ -86,7 +86,7 @@ components:
|
||||
nullable: false
|
||||
type: boolean
|
||||
required:
|
||||
- partner.uuid
|
||||
- partnerUuid
|
||||
- memberNumberSuffix
|
||||
- validFrom
|
||||
- membershipFeeBillable
|
||||
|
@ -50,7 +50,7 @@ components:
|
||||
HsOfficePartnerPatch:
|
||||
type: object
|
||||
properties:
|
||||
partnerRel.uuid:
|
||||
partnerRelUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -103,19 +103,19 @@ components:
|
||||
type: object
|
||||
nullable: false
|
||||
properties:
|
||||
anchor.uuid:
|
||||
anchorUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
holder.uuid:
|
||||
holderUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
contact.uuid:
|
||||
contactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
required:
|
||||
- anchor.uuid
|
||||
- holder.uuid
|
||||
- relContact.uuid
|
||||
- anchorUuid
|
||||
- holderUuid
|
||||
- relContactUuid
|
||||
|
||||
HsOfficePartnerDetailsInsert:
|
||||
type: object
|
||||
|
@ -37,7 +37,7 @@ components:
|
||||
HsOfficeRelationPatch:
|
||||
type: object
|
||||
properties:
|
||||
contact.uuid:
|
||||
contactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
@ -46,10 +46,10 @@ components:
|
||||
HsOfficeRelationInsert:
|
||||
type: object
|
||||
properties:
|
||||
anchor.uuid:
|
||||
anchorUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
holder.uuid:
|
||||
holderUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
type:
|
||||
@ -58,32 +58,32 @@ components:
|
||||
mark:
|
||||
type: string
|
||||
nullable: true
|
||||
contact.uuid:
|
||||
contactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
required:
|
||||
- anchor.uuid
|
||||
- holder.uuid
|
||||
- anchorUuid
|
||||
- holderUuid
|
||||
- type
|
||||
- contact.uuid
|
||||
- contactUuid
|
||||
|
||||
# relation created as a sub-element with implicitly known type
|
||||
HsOfficeRelationSubInsert:
|
||||
type: object
|
||||
properties:
|
||||
anchor.uuid:
|
||||
anchorUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
holder.uuid:
|
||||
holderUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
mark:
|
||||
type: string
|
||||
nullable: true
|
||||
contact.uuid:
|
||||
contactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
required:
|
||||
- anchor.uuid
|
||||
- holder.uuid
|
||||
- contact.uuid
|
||||
- anchorUuid
|
||||
- holderUuid
|
||||
- contactUuid
|
||||
|
@ -48,11 +48,11 @@ components:
|
||||
HsOfficeSepaMandateInsert:
|
||||
type: object
|
||||
properties:
|
||||
debitor.uuid:
|
||||
debitorUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
bankAccount.uuid:
|
||||
bankAccountUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
@ -72,8 +72,8 @@ components:
|
||||
format: date
|
||||
nullable: true
|
||||
required:
|
||||
- debitor.uuid
|
||||
- bankAccount.uuid
|
||||
- debitorUuid
|
||||
- bankAccountUuid
|
||||
- reference
|
||||
- agreement
|
||||
- validFrom
|
||||
|
@ -8,21 +8,21 @@ components:
|
||||
properties:
|
||||
grantedByRoleIdName:
|
||||
type: string
|
||||
grantedByRole.uuid:
|
||||
grantedByRoleUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
assumed:
|
||||
type: boolean
|
||||
grantedRoleIdName:
|
||||
type: string
|
||||
grantedRole.uuid:
|
||||
grantedRoleUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
granteeSubjectName:
|
||||
type: string
|
||||
granteeSubject.uuid:
|
||||
granteeSubjectUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
required:
|
||||
- grantedRole.uuid
|
||||
- granteeSubject.uuid
|
||||
- grantedRoleUuid
|
||||
- granteeSubjectUuid
|
||||
|
@ -9,7 +9,7 @@ components:
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
object.uuid:
|
||||
objectUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
objectTable:
|
||||
|
@ -14,7 +14,7 @@ components:
|
||||
RbacSubjectPermission:
|
||||
type: object
|
||||
properties:
|
||||
object.uuid:
|
||||
objectUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
objectTable:
|
||||
@ -23,10 +23,10 @@ components:
|
||||
type: string
|
||||
roleName:
|
||||
type: string
|
||||
role.uuid:
|
||||
roleUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
permission.uuid:
|
||||
permissionUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
op:
|
||||
|
@ -150,7 +150,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"project.uuid": "{projectUuid}",
|
||||
"projectUuid": "{projectUuid}",
|
||||
"type": "MANAGED_SERVER",
|
||||
"caption": "some new booking",
|
||||
"validTo": "{validTo}",
|
||||
@ -200,8 +200,8 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"project.uuid": "{projectUuid}",
|
||||
"parentItem.uuid": "{managedServerUuid}",
|
||||
"projectUuid": "{projectUuid}",
|
||||
"parentItemUuid": "{managedServerUuid}",
|
||||
"type": "MANAGED_WEBSPACE",
|
||||
"caption": "some managed webspace",
|
||||
"resources": {
|
||||
@ -270,7 +270,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"project.uuid": "{projectUuid}",
|
||||
"projectUuid": "{projectUuid}",
|
||||
"type": "DOMAIN_SETUP",
|
||||
"caption": "Domain-Setup for example.org",
|
||||
"resources": {
|
||||
@ -285,7 +285,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_HTTP_SETUP",
|
||||
"assignedToAsset.uuid": "{unixUserUuid}"
|
||||
"assignedToAssetUuid": "{unixUserUuid}"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_MBOX_SETUP"
|
||||
@ -360,7 +360,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"project.uuid": "{projectUuid}",
|
||||
"projectUuid": "{projectUuid}",
|
||||
"type": "DOMAIN_SETUP",
|
||||
"caption": "some new domain-setup booking",
|
||||
"resources": {
|
||||
@ -375,7 +375,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_HTTP_SETUP",
|
||||
"assignedToAsset.uuid": "{unixUserUuid}"
|
||||
"assignedToAssetUuid": "{unixUserUuid}"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_MBOX_SETUP"
|
||||
|
@ -105,7 +105,7 @@ class HsBookingItemControllerRestTest {
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content("""
|
||||
{
|
||||
"project.uuid": "{projectUuid}",
|
||||
"projectUuid": "{projectUuid}",
|
||||
"type": "MANAGED_SERVER",
|
||||
"caption": "some new booking",
|
||||
"validTo": "{validTo}",
|
||||
@ -155,7 +155,7 @@ class HsBookingItemControllerRestTest {
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content("""
|
||||
{
|
||||
"project.uuid": "{projectUuid}",
|
||||
"projectUuid": "{projectUuid}",
|
||||
"type": "MANAGED_SERVER",
|
||||
"caption": "some new booking",
|
||||
"validFrom": "{validFrom}",
|
||||
|
@ -92,7 +92,7 @@ class HsBookingProjectControllerAcceptanceTest extends ContextBasedTestWithClean
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"debitor.uuid": "%s",
|
||||
"debitorUuid": "%s",
|
||||
"caption": "some new project"
|
||||
}
|
||||
""".formatted(givenDebitor.getUuid()))
|
||||
|
@ -165,10 +165,10 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"bookingItem.uuid": "%s",
|
||||
"bookingItemUuid": "%s",
|
||||
"type": "MANAGED_WEBSPACE",
|
||||
"identifier": "fir10",
|
||||
"parentAsset.uuid": "%s",
|
||||
"parentAssetUuid": "%s",
|
||||
"caption": "some separate ManagedWebspace HA",
|
||||
"config": {}
|
||||
}
|
||||
@ -227,7 +227,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"parentAsset.uuid": "%s",
|
||||
"parentAssetUuid": "%s",
|
||||
"type": "UNIX_USER",
|
||||
"identifier": "fir01-temp",
|
||||
"caption": "some new UnixUser in client's ManagedWebspace",
|
||||
@ -280,7 +280,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"bookingItem.uuid": "%s",
|
||||
"bookingItemUuid": "%s",
|
||||
"type": "DOMAIN_SETUP",
|
||||
"identifier": "example.com",
|
||||
"caption": "some unrelated domain-setup",
|
||||
@ -326,7 +326,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"bookingItem.uuid": "%s",
|
||||
"bookingItemUuid": "%s",
|
||||
"type": "MANAGED_SERVER",
|
||||
"identifier": "vm1400",
|
||||
"caption": "some new ManagedServer",
|
||||
@ -381,7 +381,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"parentAsset.uuid": "%s",
|
||||
"parentAssetUuid": "%s",
|
||||
"type": "UNIX_USER",
|
||||
"identifier": "fir01-extra",
|
||||
"caption": "some extra UnixUser",
|
||||
@ -508,7 +508,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"alarmContact.uuid": "%s",
|
||||
"alarmContactUuid": "%s",
|
||||
"config": {
|
||||
"monit_max_ssd_usage": 85,
|
||||
"monit_max_hdd_usage": null,
|
||||
|
@ -83,7 +83,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
|
||||
"subHostingAssets": [
|
||||
{
|
||||
"type": "DOMAIN_HTTP_SETUP",
|
||||
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
|
||||
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_DNS_SETUP"
|
||||
@ -124,7 +124,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
|
||||
"subHostingAssets": [
|
||||
{
|
||||
"type": "DOMAIN_HTTP_SETUP",
|
||||
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
|
||||
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_DNS_SETUP"
|
||||
@ -164,7 +164,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
|
||||
"subHostingAssets": [
|
||||
{
|
||||
"type": "DOMAIN_HTTP_SETUP",
|
||||
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
|
||||
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_DNS_SETUP"
|
||||
@ -206,7 +206,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
|
||||
"subHostingAssets": [
|
||||
{
|
||||
"type": "DOMAIN_HTTP_SETUP",
|
||||
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
|
||||
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN_DNS_SETUP"
|
||||
|
@ -180,7 +180,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "DEPOSIT",
|
||||
"assetValue": 1024.00,
|
||||
"valueDate": "2022-10-13",
|
||||
@ -237,13 +237,13 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "ADJUSTMENT",
|
||||
"assetValue": %s,
|
||||
"valueDate": "2022-10-30",
|
||||
"reference": "test ref adjustment",
|
||||
"comment": "some coop assets adjustment transaction",
|
||||
"reverseEntry.uuid": "%s"
|
||||
"reverseEntryUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
givenMembership.getUuid(),
|
||||
@ -270,7 +270,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
|
||||
"reference": "test ref"
|
||||
}
|
||||
}
|
||||
"""))
|
||||
""".formatted(givenTransaction.getUuid())))
|
||||
.header("Location", startsWith("http://localhost"))
|
||||
.extract().header("Location"); // @formatter:on
|
||||
|
||||
@ -293,7 +293,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "DISBURSAL",
|
||||
"assetValue": -10240.00,
|
||||
"valueDate": "2022-10-13",
|
||||
|
@ -37,7 +37,7 @@ class HsOfficeCoopAssetsTransactionControllerRestTest {
|
||||
|
||||
static final String VALID_INSERT_REQUEST_BODY = """
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "DEPOSIT",
|
||||
"assetValue": 128.00,
|
||||
"valueDate": "2022-10-13",
|
||||
@ -48,8 +48,8 @@ class HsOfficeCoopAssetsTransactionControllerRestTest {
|
||||
|
||||
enum BadRequestTestCases {
|
||||
MEMBERSHIP_UUID_MISSING(
|
||||
requestBody -> requestBody.without("membership.uuid"),
|
||||
"[membershipUuid must not be null but is \"null\"]"), // TODO.impl: should be membership.uuid, Spring validation-problem?
|
||||
requestBody -> requestBody.without("membershipUuid"),
|
||||
"[membershipUuid must not be null but is \"null\"]"),
|
||||
|
||||
TRANSACTION_TYPE_MISSING(
|
||||
requestBody -> requestBody.without("transactionType"),
|
||||
@ -121,10 +121,10 @@ class HsOfficeCoopAssetsTransactionControllerRestTest {
|
||||
.accept(MediaType.APPLICATION_JSON))
|
||||
|
||||
// then
|
||||
.andExpect(jsonPath("message", is("ERROR: [400] " + testCase.expectedErrorMessage)))
|
||||
.andExpect(status().is4xxClientError())
|
||||
.andExpect(jsonPath("statusCode", is(400)))
|
||||
.andExpect(jsonPath("statusPhrase", is("Bad Request")))
|
||||
.andExpect(status().is4xxClientError());
|
||||
.andExpect(jsonPath("message", is("ERROR: [400] " + testCase.expectedErrorMessage)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased
|
||||
final var location = RestAssured // @formatter:off
|
||||
.given().header("current-subject", "superuser-alex@hostsharing.net").contentType(ContentType.JSON).body("""
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "SUBSCRIPTION",
|
||||
"shareCount": 8,
|
||||
"valueDate": "2022-10-13",
|
||||
@ -214,13 +214,13 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "ADJUSTMENT",
|
||||
"shareCount": %s,
|
||||
"valueDate": "2022-10-30",
|
||||
"reference": "test ref adjustment",
|
||||
"comment": "some coop shares adjustment transaction",
|
||||
"adjustedShareTx.uuid": "%s"
|
||||
"adjustedShareTxUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
givenMembership.getUuid(),
|
||||
@ -267,7 +267,7 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased
|
||||
RestAssured // @formatter:off
|
||||
.given().header("current-subject", "superuser-alex@hostsharing.net").contentType(ContentType.JSON).body("""
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "CANCELLATION",
|
||||
"shareCount": -80,
|
||||
"valueDate": "2022-10-13",
|
||||
|
@ -37,7 +37,7 @@ class HsOfficeCoopSharesTransactionControllerRestTest {
|
||||
|
||||
static final String VALID_INSERT_REQUEST_BODY = """
|
||||
{
|
||||
"membership.uuid": "%s",
|
||||
"membershipUuid": "%s",
|
||||
"transactionType": "SUBSCRIPTION",
|
||||
"shareCount": 8,
|
||||
"valueDate": "2022-10-13",
|
||||
@ -48,7 +48,7 @@ class HsOfficeCoopSharesTransactionControllerRestTest {
|
||||
|
||||
enum BadRequestTestCases {
|
||||
MEMBERSHIP_UUID_MISSING(
|
||||
requestBody -> requestBody.without("membership.uuid"),
|
||||
requestBody -> requestBody.without("membershipUuid"),
|
||||
"[membershipUuid must not be null but is \"null\"]"),
|
||||
|
||||
TRANSACTION_TYPE_MISSING(
|
||||
|
@ -287,14 +287,14 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"debitorRel.uuid": "%s",
|
||||
"debitorRelUuid": "%s",
|
||||
"debitorNumberSuffix": "%s",
|
||||
"billable": "true",
|
||||
"vatId": "VAT123456",
|
||||
"vatCountryCode": "DE",
|
||||
"vatBusiness": true,
|
||||
"vatReverseCharge": "false",
|
||||
"refundBankAccount.uuid": "%s",
|
||||
"refundBankAccountUuid": "%s",
|
||||
"defaultPrefix": "for"
|
||||
}
|
||||
""".formatted( givenDebitorRelUUid, ++nextDebitorSuffix, givenBankAccount.getUuid()))
|
||||
@ -333,9 +333,9 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
.body("""
|
||||
{
|
||||
"debitorRel": {
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
},
|
||||
"debitorNumberSuffix": "%s",
|
||||
"defaultPrefix": "for",
|
||||
@ -384,9 +384,9 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
.body("""
|
||||
{
|
||||
"debitorRel": {
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
},
|
||||
"debitorNumberSuffix": "%s",
|
||||
"defaultPrefix": "for",
|
||||
@ -418,7 +418,7 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"debitorRel.uuid": "%s",
|
||||
"debitorRelUuid": "%s",
|
||||
"debitorNumberSuffix": "%s",
|
||||
"defaultPrefix": "for",
|
||||
"billable": "true",
|
||||
|
@ -182,7 +182,7 @@ class HsOfficeMembershipControllerAcceptanceTest extends ContextBasedTestWithCle
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"partner.uuid": "%s",
|
||||
"partnerUuid": "%s",
|
||||
"memberNumberSuffix": "%s",
|
||||
"validFrom": "2022-10-13",
|
||||
"membershipFeeBillable": "true"
|
||||
|
@ -56,12 +56,12 @@ public class HsOfficeMembershipControllerRestTest {
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content("""
|
||||
{
|
||||
"partner.uuid": null,
|
||||
"partnerUuid": null,
|
||||
"memberNumberSuffix": "01",
|
||||
"validFrom": "2022-10-13",
|
||||
"membershipFeeBillable": "true"
|
||||
}
|
||||
""")
|
||||
""".formatted(UUID.randomUUID()))
|
||||
.accept(MediaType.APPLICATION_JSON))
|
||||
|
||||
// then
|
||||
@ -86,7 +86,7 @@ public class HsOfficeMembershipControllerRestTest {
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content("""
|
||||
{
|
||||
"partner.uuid": "%s",
|
||||
"partnerUuid": "%s",
|
||||
"memberNumberSuffix": "01",
|
||||
"validFrom": "2022-10-13",
|
||||
"membershipFeeBillable": "true"
|
||||
@ -112,7 +112,7 @@ public class HsOfficeMembershipControllerRestTest {
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content("""
|
||||
{
|
||||
"partner.uuid": "%s",
|
||||
"partnerUuid": "%s",
|
||||
%s
|
||||
"validFrom": "2022-10-13",
|
||||
"membershipFeeBillable": "true"
|
||||
|
@ -102,9 +102,9 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
{
|
||||
"partnerNumber": "20002",
|
||||
"partnerRel": {
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
},
|
||||
"details": {
|
||||
"registrationOffice": "Temp Registergericht Aurich",
|
||||
@ -161,12 +161,12 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
{
|
||||
"partnerNumber": "20003",
|
||||
"partnerRel": {
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
},
|
||||
"person.uuid": "%s",
|
||||
"contact.uuid": "%s",
|
||||
"personUuid": "%s",
|
||||
"contactUuid": "%s",
|
||||
"details": {}
|
||||
}
|
||||
""".formatted(
|
||||
@ -199,12 +199,12 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
{
|
||||
"partnerNumber": "20004",
|
||||
"partnerRel": {
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
},
|
||||
"person.uuid": "%s",
|
||||
"contact.uuid": "%s",
|
||||
"personUuid": "%s",
|
||||
"contactUuid": "%s",
|
||||
"details": {}
|
||||
}
|
||||
""".formatted(
|
||||
@ -321,7 +321,7 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
.body("""
|
||||
{
|
||||
"partnerNumber": "20011",
|
||||
"partnerRel.uuid": "%s",
|
||||
"partnerRelUuid": "%s",
|
||||
"details": {
|
||||
"registrationOffice": "Temp Registergericht Aurich",
|
||||
"registrationNumber": "222222",
|
||||
@ -387,7 +387,7 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"partnerRel.uuid": "%s"
|
||||
"partnerRelUuid": "%s"
|
||||
}
|
||||
""".formatted(givenPartnerRel.getUuid()))
|
||||
.port(port)
|
||||
|
@ -101,12 +101,12 @@ class HsOfficePartnerControllerRestTest {
|
||||
{
|
||||
"partnerNumber": "20002",
|
||||
"partnerRel": {
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
},
|
||||
"person.uuid": "%s",
|
||||
"contact.uuid": "%s",
|
||||
"personUuid": "%s",
|
||||
"contactUuid": "%s",
|
||||
"details": {
|
||||
"registrationOffice": "Temp Registergericht Aurich",
|
||||
"registrationNumber": "111111"
|
||||
@ -138,12 +138,12 @@ class HsOfficePartnerControllerRestTest {
|
||||
{
|
||||
"partnerNumber": "20002",
|
||||
"partnerRel": {
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
},
|
||||
"person.uuid": "%s",
|
||||
"contact.uuid": "%s",
|
||||
"personUuid": "%s",
|
||||
"contactUuid": "%s",
|
||||
"details": {
|
||||
"registrationOffice": "Temp Registergericht Aurich",
|
||||
"registrationNumber": "111111"
|
||||
|
@ -235,9 +235,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
|
||||
{
|
||||
"type": "%s",
|
||||
"mark": "%s",
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
HsOfficeRelationTypeResource.SUBSCRIBER,
|
||||
@ -281,9 +281,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
|
||||
.body("""
|
||||
{
|
||||
"type": "%s",
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
HsOfficeRelationTypeResource.DEBITOR,
|
||||
@ -313,9 +313,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
|
||||
.body("""
|
||||
{
|
||||
"type": "%s",
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
HsOfficeRelationTypeResource.DEBITOR,
|
||||
@ -346,9 +346,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
|
||||
.body("""
|
||||
{
|
||||
"type": "%s",
|
||||
"anchor.uuid": "%s",
|
||||
"holder.uuid": "%s",
|
||||
"contact.uuid": "%s"
|
||||
"anchorUuid": "%s",
|
||||
"holderUuid": "%s",
|
||||
"contactUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
HsOfficeRelationTypeResource.DEBITOR,
|
||||
@ -461,7 +461,7 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"contact.uuid": "%s"
|
||||
"contactUuid": "%s"
|
||||
}
|
||||
""".formatted(givenContact.getUuid()))
|
||||
.port(port)
|
||||
|
@ -11,14 +11,12 @@ import net.hostsharing.hsadminng.hs.office.scenarios.debitor.CreateSepaMandateFo
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.FinallyDeleteSepaMandateForDebitor;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.DontDeleteDefaultDebitor;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.InvalidateSepaMandateForDebitor;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.membership.CancelMembership;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.membership.CreateMembership;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.partner.AddOperationsContactToPartner;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.partner.CreatePartner;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.DeleteDebitor;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.partner.DeletePartner;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.partner.AddRepresentativeToPartner;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.person.ShouldUpdatePersonData;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.subscription.RemoveOperationsContactFromPartner;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.subscription.SubscribeToMailinglist;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.subscription.UnsubscribeFromMailinglist;
|
||||
@ -199,16 +197,6 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
||||
.doRun();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(1201)
|
||||
@Requires("Partner: Michelle Matthieu")
|
||||
void shouldUpdatePersonData() {
|
||||
new ShouldUpdatePersonData(this)
|
||||
.given("oldFamilyName", "Matthieu")
|
||||
.given("newFamilyName", "Matthieu-Zhang")
|
||||
.doRun();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(2010)
|
||||
@Requires("Partner: Test AG")
|
||||
@ -314,26 +302,12 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
||||
@Test
|
||||
@Order(4000)
|
||||
@Requires("Partner: Test AG")
|
||||
@Produces("Membership: Test AG 00")
|
||||
void shouldCreateMembershipForPartner() {
|
||||
new CreateMembership(this)
|
||||
.given("partnerName", "Test AG")
|
||||
.given("memberNumberSuffix", "00")
|
||||
.given("validFrom", "2024-10-15")
|
||||
.given("newStatus", "ACTIVE")
|
||||
.given("membershipFeeBillable", "true")
|
||||
.doRun()
|
||||
.keep();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(4900)
|
||||
@Requires("Membership: Test AG 00")
|
||||
void shouldCancelMembershipOfPartner() {
|
||||
new CancelMembership(this)
|
||||
.given("memberNumber", "3101000")
|
||||
.given("validTo", "2025-12-30")
|
||||
.given("newStatus", "CANCELLED")
|
||||
.doRun();
|
||||
}
|
||||
|
||||
|
@ -86,13 +86,13 @@ public abstract class UseCase<T extends UseCase<?>> {
|
||||
})
|
||||
);
|
||||
final var response = run();
|
||||
verify(response);
|
||||
verify();
|
||||
return response;
|
||||
}
|
||||
|
||||
protected abstract HttpResponse run();
|
||||
|
||||
protected void verify(final HttpResponse response) {
|
||||
protected void verify() {
|
||||
}
|
||||
|
||||
public final UseCase<T> given(final String propName, final Object propValue) {
|
||||
@ -233,7 +233,6 @@ public abstract class UseCase<T extends UseCase<?>> {
|
||||
@Getter
|
||||
private final HttpStatus status;
|
||||
|
||||
@Getter
|
||||
private UUID locationUuid;
|
||||
|
||||
@SneakyThrows
|
||||
|
@ -40,7 +40,7 @@ public class AddPhoneNumberToContactData extends UseCase<AddPhoneNumberToContact
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<AddPhoneNumberToContactData>.HttpResponse response) {
|
||||
protected void verify() {
|
||||
verify(
|
||||
"Verify if the New Phone Number Got Added",
|
||||
() -> httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
||||
|
@ -39,7 +39,7 @@ public class RemovePhoneNumberFromContactData extends UseCase<RemovePhoneNumberF
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<RemovePhoneNumberFromContactData>.HttpResponse response) {
|
||||
protected void verify() {
|
||||
verify(
|
||||
"Verify if the New Phone Number Got Added",
|
||||
() -> httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
||||
|
@ -47,7 +47,7 @@ public class ReplaceContactData extends UseCase<ReplaceContactData> {
|
||||
withTitle("Replace the Contact-Reference in the Partner-Relation", () ->
|
||||
httpPatch("/api/hs/office/relations/%{partnerRelationUuid}", usingJsonBody("""
|
||||
{
|
||||
"contact.uuid": ${Contact: %{newContactCaption}}
|
||||
"contactUuid": ${Contact: %{newContactCaption}}
|
||||
}
|
||||
"""))
|
||||
.expecting(OK)
|
||||
@ -57,7 +57,7 @@ public class ReplaceContactData extends UseCase<ReplaceContactData> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<ReplaceContactData>.HttpResponse response) {
|
||||
protected void verify() {
|
||||
verify(
|
||||
"Verify if the Contact-Relation Got Replaced in the Partner-Relation",
|
||||
() -> httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
||||
|
@ -55,9 +55,9 @@ public class CreateExternalDebitorForPartner extends UseCase<CreateExternalDebit
|
||||
return httpPost("/api/hs/office/debitors", usingJsonBody("""
|
||||
{
|
||||
"debitorRel": {
|
||||
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holder.uuid": ${Person: Billing GmbH},
|
||||
"contact.uuid": ${Contact: Billing GmbH - Test AG billing}
|
||||
"anchorUuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holderUuid": ${Person: Billing GmbH},
|
||||
"contactUuid": ${Contact: Billing GmbH - Test AG billing}
|
||||
},
|
||||
"debitorNumberSuffix": ${debitorNumberSuffix},
|
||||
"billable": ${billable},
|
||||
@ -65,7 +65,7 @@ public class CreateExternalDebitorForPartner extends UseCase<CreateExternalDebit
|
||||
"vatCountryCode": ${vatCountryCode},
|
||||
"vatBusiness": ${vatBusiness},
|
||||
"vatReverseCharge": ${vatReverseCharge},
|
||||
"refundBankAccount.uuid": ${BankAccount: Billing GmbH - refund bank account},
|
||||
"refundBankAccountUuid": ${BankAccount: Billing GmbH - refund bank account},
|
||||
"defaultPrefix": ${defaultPrefix}
|
||||
}
|
||||
"""))
|
||||
|
@ -48,9 +48,9 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
|
||||
return httpPost("/api/hs/office/debitors", usingJsonBody("""
|
||||
{
|
||||
"debitorRel": {
|
||||
"anchor.uuid": ${partnerPersonUuid},
|
||||
"holder.uuid": ${partnerPersonUuid},
|
||||
"contact.uuid": ${Contact: Test AG - billing department}
|
||||
"anchorUuid": ${partnerPersonUuid},
|
||||
"holderUuid": ${partnerPersonUuid},
|
||||
"contactUuid": ${Contact: Test AG - billing department}
|
||||
},
|
||||
"debitorNumberSuffix": ${debitorNumberSuffix},
|
||||
"billable": ${billable},
|
||||
@ -58,7 +58,7 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
|
||||
"vatCountryCode": ${vatCountryCode},
|
||||
"vatBusiness": ${vatBusiness},
|
||||
"vatReverseCharge": ${vatReverseCharge},
|
||||
"refundBankAccount.uuid": ${BankAccount: Test AG - refund bank account},
|
||||
"refundBankAccountUuid": ${BankAccount: Test AG - refund bank account},
|
||||
"defaultPrefix": ${defaultPrefix}
|
||||
}
|
||||
"""))
|
||||
|
@ -35,8 +35,8 @@ public class CreateSepaMandateForDebitor extends UseCase<CreateSepaMandateForDeb
|
||||
|
||||
return httpPost("/api/hs/office/sepamandates", usingJsonBody("""
|
||||
{
|
||||
"debitor.uuid": ${Debitor: Test AG - main debitor},
|
||||
"bankAccount.uuid": ${BankAccount: Test AG - debit bank account},
|
||||
"debitorUuid": ${Debitor: Test AG - main debitor},
|
||||
"bankAccountUuid": ${BankAccount: Test AG - debit bank account},
|
||||
"reference": ${mandateReference},
|
||||
"agreement": ${mandateAgreement},
|
||||
"validFrom": ${mandateValidFrom}
|
||||
|
@ -1,47 +0,0 @@
|
||||
package net.hostsharing.hsadminng.hs.office.scenarios.membership;
|
||||
|
||||
import io.restassured.http.ContentType;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.UseCase;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import static io.restassured.http.ContentType.JSON;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
|
||||
public class CancelMembership extends UseCase<CancelMembership> {
|
||||
|
||||
public CancelMembership(final ScenarioTest testSuite) {
|
||||
super(testSuite);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected HttpResponse run() {
|
||||
|
||||
obtain("Membership: %{memberNumber}", () ->
|
||||
httpGet("/api/hs/office/memberships?memberNumber=%{memberNumber}")
|
||||
.expectArrayElements(1),
|
||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid")
|
||||
);
|
||||
|
||||
return withTitle("Patch the New Status Into the Membership", () ->
|
||||
httpPatch("/api/hs/office/memberships/%{Membership: %{memberNumber}}", usingJsonBody("""
|
||||
{
|
||||
"validTo": ${validTo},
|
||||
"status": ${newStatus}
|
||||
}
|
||||
"""))
|
||||
.expecting(HttpStatus.OK).expecting(ContentType.JSON)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<CancelMembership>.HttpResponse response) {
|
||||
verify(
|
||||
"Verify That the Membership Got Cancelled",
|
||||
() -> httpGet("/api/hs/office/memberships/%{Membership: %{memberNumber}}")
|
||||
.expecting(OK).expecting(JSON),
|
||||
path("validTo").contains("%{validTo}"),
|
||||
path("status").contains("CANCELLED")
|
||||
);
|
||||
}
|
||||
}
|
@ -5,9 +5,6 @@ import net.hostsharing.hsadminng.hs.office.scenarios.UseCase;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import static io.restassured.http.ContentType.JSON;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
|
||||
public class CreateMembership extends UseCase<CreateMembership> {
|
||||
|
||||
public CreateMembership(final ScenarioTest testSuite) {
|
||||
@ -16,26 +13,17 @@ public class CreateMembership extends UseCase<CreateMembership> {
|
||||
|
||||
@Override
|
||||
protected HttpResponse run() {
|
||||
return httpPost("/api/hs/office/memberships", usingJsonBody("""
|
||||
obtain("Membership: %{partnerName} 00", () ->
|
||||
httpPost("/api/hs/office/memberships", usingJsonBody("""
|
||||
{
|
||||
"partner.uuid": ${Partner: Test AG},
|
||||
"partnerUuid": ${Partner: Test AG},
|
||||
"memberNumberSuffix": ${memberNumberSuffix},
|
||||
"status": "ACTIVE",
|
||||
"validFrom": ${validFrom},
|
||||
"membershipFeeBillable": ${membershipFeeBillable}
|
||||
}
|
||||
"""))
|
||||
.expecting(HttpStatus.CREATED).expecting(ContentType.JSON);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<CreateMembership>.HttpResponse response) {
|
||||
verify(
|
||||
"Verify That the Membership Got Created",
|
||||
() -> httpGet("/api/hs/office/memberships/" + response.getLocationUuid())
|
||||
.expecting(OK).expecting(JSON),
|
||||
path("validFrom").contains("%{validFrom}"),
|
||||
path("status").contains("ACTIVE")
|
||||
.expecting(HttpStatus.CREATED).expecting(ContentType.JSON)
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -57,16 +57,16 @@ public class AddOperationsContactToPartner extends UseCase<AddOperationsContactT
|
||||
return httpPost("/api/hs/office/relations", usingJsonBody("""
|
||||
{
|
||||
"type": "OPERATIONS",
|
||||
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holder.uuid": ${Person: %{operationsContactGivenName} %{operationsContactFamilyName}},
|
||||
"contact.uuid": ${Contact: %{operationsContactGivenName} %{operationsContactFamilyName}}
|
||||
"anchorUuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holderUuid": ${Person: %{operationsContactGivenName} %{operationsContactFamilyName}},
|
||||
"contactUuid": ${Contact: %{operationsContactGivenName} %{operationsContactFamilyName}}
|
||||
}
|
||||
"""))
|
||||
.expecting(CREATED).expecting(JSON);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<AddOperationsContactToPartner>.HttpResponse response) {
|
||||
protected void verify() {
|
||||
verify(
|
||||
"Verify the New OPERATIONS Relation",
|
||||
() -> httpGet("/api/hs/office/relations?relationType=OPERATIONS&personData=" + uriEncoded(
|
||||
|
@ -60,16 +60,16 @@ public class AddRepresentativeToPartner extends UseCase<AddRepresentativeToPartn
|
||||
return httpPost("/api/hs/office/relations", usingJsonBody("""
|
||||
{
|
||||
"type": "REPRESENTATIVE",
|
||||
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holder.uuid": ${Person: %{representativeGivenName} %{representativeFamilyName}},
|
||||
"contact.uuid": ${Contact: %{representativeGivenName} %{representativeFamilyName}}
|
||||
"anchorUuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holderUuid": ${Person: %{representativeGivenName} %{representativeFamilyName}},
|
||||
"contactUuid": ${Contact: %{representativeGivenName} %{representativeFamilyName}}
|
||||
}
|
||||
"""))
|
||||
.expecting(CREATED).expecting(JSON);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<AddRepresentativeToPartner>.HttpResponse response) {
|
||||
protected void verify() {
|
||||
verify(
|
||||
"Verify the REPRESENTATIVE Relation Got Removed",
|
||||
() -> httpGet("/api/hs/office/relations?relationType=REPRESENTATIVE&personData=" + uriEncoded("%{representativeFamilyName}"))
|
||||
|
@ -62,9 +62,9 @@ public class CreatePartner extends UseCase<CreatePartner> {
|
||||
{
|
||||
"partnerNumber": ${partnerNumber},
|
||||
"partnerRel": {
|
||||
"anchor.uuid": ${Person: Hostsharing eG},
|
||||
"holder.uuid": ${Person: %{%{tradeName???}???%{givenName???} %{familyName???}}},
|
||||
"contact.uuid": ${Contact: %{contactCaption}}
|
||||
"anchorUuid": ${Person: Hostsharing eG},
|
||||
"holderUuid": ${Person: %{%{tradeName???}???%{givenName???} %{familyName???}}},
|
||||
"contactUuid": ${Contact: %{contactCaption}}
|
||||
},
|
||||
"details": {
|
||||
"registrationOffice": "Registergericht Hamburg",
|
||||
@ -76,7 +76,7 @@ public class CreatePartner extends UseCase<CreatePartner> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<CreatePartner>.HttpResponse response) {
|
||||
protected void verify() {
|
||||
verify(
|
||||
"Verify the New Partner Relation",
|
||||
() -> httpGet("/api/hs/office/relations?relationType=PARTNER&contactData=&{contactCaption}")
|
||||
|
@ -1,48 +0,0 @@
|
||||
package net.hostsharing.hsadminng.hs.office.scenarios.person;
|
||||
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest;
|
||||
import net.hostsharing.hsadminng.hs.office.scenarios.UseCase;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import static io.restassured.http.ContentType.JSON;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
|
||||
public class ShouldUpdatePersonData extends UseCase<ShouldUpdatePersonData> {
|
||||
|
||||
public ShouldUpdatePersonData(final ScenarioTest testSuite) {
|
||||
super(testSuite);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected HttpResponse run() {
|
||||
|
||||
obtain(
|
||||
"personUuid",
|
||||
() -> httpGet("/api/hs/office/persons?name=" + uriEncoded("%{oldFamilyName}"))
|
||||
.expecting(OK).expecting(JSON),
|
||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||
);
|
||||
|
||||
withTitle("Patch the Additional Phone-Number into the Person", () ->
|
||||
httpPatch("/api/hs/office/persons/%{personUuid}", usingJsonBody("""
|
||||
{
|
||||
"familyName": ${newFamilyName}
|
||||
}
|
||||
"""))
|
||||
.expecting(HttpStatus.OK)
|
||||
);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<ShouldUpdatePersonData>.HttpResponse response) {
|
||||
verify(
|
||||
"Verify that the Family Name Got Amended",
|
||||
() -> httpGet("/api/hs/office/persons/%{personUuid}")
|
||||
.expecting(OK).expecting(JSON),
|
||||
path("familyName").contains("%{newFamilyName}")
|
||||
);
|
||||
}
|
||||
}
|
@ -33,7 +33,7 @@ public class RemoveOperationsContactFromPartner extends UseCase<RemoveOperations
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void verify(final UseCase<RemoveOperationsContactFromPartner>.HttpResponse response) {
|
||||
protected void verify() {
|
||||
verify(
|
||||
"Verify the New OPERATIONS Relation",
|
||||
() -> httpGet("/api/hs/office/relations/&{Operations-Contact: %{operationsContactPerson}}")
|
||||
|
@ -52,9 +52,9 @@ public class SubscribeToMailinglist extends UseCase<SubscribeToMailinglist> {
|
||||
{
|
||||
"type": "SUBSCRIBER",
|
||||
"mark": ${mailingList},
|
||||
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holder.uuid": ${Person: %{subscriberGivenName} %{subscriberFamilyName}},
|
||||
"contact.uuid": ${Contact: %{subscriberGivenName} %{subscriberFamilyName}}
|
||||
"anchorUuid": ${Person: %{partnerPersonTradeName}},
|
||||
"holderUuid": ${Person: %{subscriberGivenName} %{subscriberFamilyName}},
|
||||
"contactUuid": ${Contact: %{subscriberGivenName} %{subscriberFamilyName}}
|
||||
}
|
||||
"""))
|
||||
.expecting(CREATED).expecting(JSON);
|
||||
|
@ -144,8 +144,8 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"debitor.uuid": "%s",
|
||||
"bankAccount.uuid": "%s",
|
||||
"debitorUuid": "%s",
|
||||
"bankAccountUuid": "%s",
|
||||
"reference": "temp ref CAT A",
|
||||
"agreement": "2020-01-02",
|
||||
"validFrom": "2022-10-13"
|
||||
@ -186,7 +186,7 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"bankAccount.uuid": "%s",
|
||||
"bankAccountUuid": "%s",
|
||||
"reference": "temp ref CAT B",
|
||||
"validFrom": "2022-10-13"
|
||||
}
|
||||
@ -211,8 +211,8 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"debitor.uuid": "%s",
|
||||
"bankAccount.uuid": "%s",
|
||||
"debitorUuid": "%s",
|
||||
"bankAccountUuid": "%s",
|
||||
"reference": "temp ref CAT C",
|
||||
"agreement": "2022-10-12",
|
||||
"validFrom": "2022-10-13",
|
||||
@ -241,8 +241,8 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
|
||||
.contentType(ContentType.JSON)
|
||||
.body("""
|
||||
{
|
||||
"debitor.uuid": "%s",
|
||||
"bankAccount.uuid": "%s",
|
||||
"debitorUuid": "%s",
|
||||
"bankAccountUuid": "%s",
|
||||
"reference": "temp refCAT D",
|
||||
"agreement": "2022-10-12",
|
||||
"validFrom": "2022-10-13",
|
||||
|
@ -388,8 +388,8 @@ class RbacGrantControllerAcceptanceTest extends ContextBasedTest {
|
||||
.body("""
|
||||
{
|
||||
"assumed": true,
|
||||
"grantedRole.uuid": "%s",
|
||||
"granteeSubject.uuid": "%s"
|
||||
"grantedRoleUuid": "%s",
|
||||
"granteeSubjectUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
grantedRole.getUuid(),
|
||||
@ -424,8 +424,8 @@ class RbacGrantControllerAcceptanceTest extends ContextBasedTest {
|
||||
.body("""
|
||||
{
|
||||
"assumed": true,
|
||||
"grantedRole.uuid": "%s",
|
||||
"granteeSubject.uuid": "%s"
|
||||
"grantedRoleUuid": "%s",
|
||||
"granteeSubjectUuid": "%s"
|
||||
}
|
||||
""".formatted(
|
||||
grantedRole.getUuid(),
|
||||
|
@ -76,8 +76,8 @@ class RbacRoleControllerRestTest {
|
||||
.andExpect(jsonPath("$[1].roleName", is("rbactest.customer#xxx:OWNER")))
|
||||
.andExpect(jsonPath("$[2].roleName", is("rbactest.customer#xxx:ADMIN")))
|
||||
.andExpect(jsonPath("$[2].uuid", is(customerXxxAdmin.getUuid().toString())))
|
||||
.andExpect(jsonPath("$[2].['object.uuid']", is(customerXxxAdmin.getObjectUuid().toString())))
|
||||
.andExpect(jsonPath("$[2].objectTable", is(customerXxxAdmin.getObjectTable())))
|
||||
.andExpect(jsonPath("$[2].objectIdName", is(customerXxxAdmin.getObjectIdName())));
|
||||
.andExpect(jsonPath("$[2].objectUuid", is(customerXxxAdmin.getObjectUuid().toString())))
|
||||
.andExpect(jsonPath("$[2].objectTable", is(customerXxxAdmin.getObjectTable().toString())))
|
||||
.andExpect(jsonPath("$[2].objectIdName", is(customerXxxAdmin.getObjectIdName().toString())));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user