amendmends according to code review and rebasing aftermaths
This commit is contained in:
parent
c16143acbd
commit
4ca89df6fd
@ -60,7 +60,7 @@ public class HsOfficeCoopSharesTransactionEntity implements Stringifyable, HasUu
|
||||
private int shareCount;
|
||||
|
||||
/**
|
||||
* The ooking reference.
|
||||
* The Booking reference.
|
||||
*/
|
||||
@Column(name = "reference")
|
||||
private String reference;
|
||||
|
@ -179,7 +179,6 @@ call generateRbacIdentityView('hs_office_partner', $idName$
|
||||
call generateRbacRestrictedView('hs_office_partner',
|
||||
'(select idName from hs_office_person_iv p where p.uuid = target.personUuid)',
|
||||
$updates$
|
||||
partnerNumber = new.partnerNumber,
|
||||
personUuid = new.personUuid,
|
||||
contactUuid = new.contactUuid
|
||||
$updates$);
|
||||
|
@ -17,7 +17,9 @@ create table if not exists hs_office_membership
|
||||
memberNumberSuffix::text ~ '^[0-9][0-9]$'),
|
||||
validity daterange not null,
|
||||
reasonForTermination HsOfficeReasonForTermination not null default 'NONE',
|
||||
membershipFeeBillable boolean not null default true
|
||||
membershipFeeBillable boolean not null default true,
|
||||
|
||||
UNIQUE(partnerUuid, memberNumberSuffix)
|
||||
);
|
||||
--//
|
||||
|
||||
|
@ -72,7 +72,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void globalAdmin_canFindCoopAssetsTransactionsByMemberNumberSuffix() {
|
||||
void globalAdmin_canFindCoopAssetsTransactionsByMemberNumber() {
|
||||
|
||||
context.define("superuser-alex@hostsharing.net");
|
||||
final var givenMembership = membershipRepo.findMembershipByMemberNumber(1000202);
|
||||
@ -114,7 +114,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void globalAdmin_canFindCoopAssetsTransactionsByMemberNumberSuffixAndDateRange() {
|
||||
void globalAdmin_canFindCoopAssetsTransactionsByMembershipUuidAndDateRange() {
|
||||
|
||||
context.define("superuser-alex@hostsharing.net");
|
||||
final var givenMembership = membershipRepo.findMembershipByMemberNumber(1000202);
|
||||
|
@ -72,7 +72,7 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void globalAdmin_canFindCoopSharesTransactionsByMemberNumberSuffix() {
|
||||
void globalAdmin_canFindCoopSharesTransactionsByMemberNumber() {
|
||||
|
||||
context.define("superuser-alex@hostsharing.net");
|
||||
final var givenMembership = membershipRepo.findMembershipByMemberNumber(1000202);
|
||||
@ -106,13 +106,14 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void globalAdmin_canFindCoopSharesTransactionsByMemberNumberSuffixAndDateRange() {
|
||||
void globalAdmin_canFindCoopSharesTransactionsByMembershipUuidAndDateRange() {
|
||||
|
||||
context.define("superuser-alex@hostsharing.net");
|
||||
final var givenMembership = membershipRepo.findMembershipByMemberNumber(1000202);
|
||||
|
||||
RestAssured // @formatter:off
|
||||
.given().header("current-user", "superuser-alex@hostsharing.net").port(port).when().get("http://localhost/api/hs/office/coopsharestransactions?membershipUuid=" + givenMembership.getUuid() + "&fromValueDate=2020-01-01&toValueDate=2021-12-31").then().log().all().assertThat().statusCode(200).contentType("application/json").body("", lenientlyEquals("""
|
||||
.given().header("current-user", "superuser-alex@hostsharing.net").port(port).when()
|
||||
.get("http://localhost/api/hs/office/coopsharestransactions?membershipUuid=" + givenMembership.getUuid() + "&fromValueDate=2020-01-01&toValueDate=2021-12-31").then().log().all().assertThat().statusCode(200).contentType("application/json").body("", lenientlyEquals("""
|
||||
[
|
||||
{
|
||||
"transactionType": "CANCELLATION",
|
||||
|
@ -104,12 +104,6 @@ class HsOfficeDebitorEntityPatcherUnitTest extends PatchUnitTestBase<
|
||||
HsOfficeDebitorEntity::setBillingContact,
|
||||
newBillingContact(PATCHED_CONTACT_UUID))
|
||||
.notNullable(),
|
||||
new SimpleProperty<>(
|
||||
"personType",
|
||||
HsOfficeDebitorPatchResource::setBillable,
|
||||
PATCHED_BILLABLE,
|
||||
HsOfficeDebitorEntity::setBillable)
|
||||
.notNullable(),
|
||||
new SimpleProperty<>(
|
||||
"billable",
|
||||
HsOfficeDebitorPatchResource::setBillable,
|
||||
|
@ -77,7 +77,7 @@ class HsOfficeMembershipRepositoryIntegrationTest extends ContextBasedTest {
|
||||
// when
|
||||
final var result = attempt(em, () -> {
|
||||
final var newMembership = toCleanup(HsOfficeMembershipEntity.builder()
|
||||
.memberNumberSuffix("01")
|
||||
.memberNumberSuffix("11")
|
||||
.partner(givenPartner)
|
||||
.mainDebitor(givenDebitor)
|
||||
.validity(Range.closedInfinite(LocalDate.parse("2020-01-01")))
|
||||
|
@ -226,7 +226,7 @@ class HsOfficePartnerRepositoryIntegrationTest extends ContextBasedTest {
|
||||
assertThat(result)
|
||||
.isNotNull()
|
||||
.extracting(Object::toString)
|
||||
.isEqualTo("partner(LEGAL First GmbH: first contact)");
|
||||
.isEqualTo("partner(LP First GmbH: first contact)");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,11 +10,11 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
class HsOfficeRelationshipEntityUnitTest {
|
||||
|
||||
private HsOfficePersonEntity anchor = HsOfficePersonEntity.builder()
|
||||
.personType(HsOfficePersonType.LEGAL)
|
||||
.personType(HsOfficePersonType.LEGAL_PERSON)
|
||||
.tradeName("some trade name")
|
||||
.build();
|
||||
private HsOfficePersonEntity holder = HsOfficePersonEntity.builder()
|
||||
.personType(HsOfficePersonType.NATURAL)
|
||||
.personType(HsOfficePersonType.NATURAL_PERSON)
|
||||
.familyName("Meier")
|
||||
.givenName("Mellie")
|
||||
.build();
|
||||
@ -27,6 +27,6 @@ class HsOfficeRelationshipEntityUnitTest {
|
||||
.relHolder(holder)
|
||||
.build();
|
||||
|
||||
assertThat(given.toShortString()).isEqualTo("rel(relAnchor='LEGAL some trade name', relType='REPRESENTATIVE', relHolder='NATURAL Meier, Mellie')");
|
||||
assertThat(given.toShortString()).isEqualTo("rel(relAnchor='LP some trade name', relType='REPRESENTATIVE', relHolder='NP Meier, Mellie')");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user