use-case-test for create membership
This commit is contained in:
parent
963bf89841
commit
dffe838aa6
@ -0,0 +1,25 @@
|
|||||||
|
package net.hostsharing.hsadminng.hs.office.usecases;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
|
import static io.restassured.http.Method.POST;
|
||||||
|
|
||||||
|
class HsOfficeMembershipUseCase extends UseCase {
|
||||||
|
|
||||||
|
public HsOfficeMembershipUseCase(final UseCaseTest testSuite) {
|
||||||
|
super(testSuite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shouldCreateMembershipForPartner() {
|
||||||
|
http(POST, "/api/hs/office/memberships", usingJsonBody("""
|
||||||
|
{
|
||||||
|
"partnerUuid": "${partner:Test AG.uuid}",
|
||||||
|
"memberNumberSuffix": "00",
|
||||||
|
"validFrom": "2024-10-15",
|
||||||
|
"membershipFeeBillable": "true"
|
||||||
|
}
|
||||||
|
"""))
|
||||||
|
.expecting(HttpStatus.CREATED)
|
||||||
|
.keepingAs("membership:Test AG 00.uuid");
|
||||||
|
}
|
||||||
|
}
|
@ -28,4 +28,10 @@ class HsOfficeUseCasesTest extends UseCaseTest {
|
|||||||
void shouldCreateSelfDebitorForPartner() {
|
void shouldCreateSelfDebitorForPartner() {
|
||||||
new HsOfficeDebitorUseCase(this).shouldCreateSelfDebitorForPartner();
|
new HsOfficeDebitorUseCase(this).shouldCreateSelfDebitorForPartner();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(1030)
|
||||||
|
void shouldCreateMembershipForPartner() {
|
||||||
|
new HsOfficeMembershipUseCase(this).shouldCreateMembershipForPartner();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user