feature/use-case-acceptance-tests #116

Merged
hsh-michaelhoennig merged 49 commits from feature/use-case-acceptance-tests into master 2024-10-30 11:40:46 +01:00
2 changed files with 31 additions and 0 deletions
Showing only changes of commit dffe838aa6 - Show all commits

View File

@ -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");
}
}

View File

@ -28,4 +28,10 @@ class HsOfficeUseCasesTest extends UseCaseTest {
void shouldCreateSelfDebitorForPartner() {
new HsOfficeDebitorUseCase(this).shouldCreateSelfDebitorForPartner();
}
@Test
@Order(1030)
void shouldCreateMembershipForPartner() {
new HsOfficeMembershipUseCase(this).shouldCreateMembershipForPartner();
}
}