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 30 additions and 0 deletions
Showing only changes of commit f7661b25dd - Show all commits

View File

@ -12,6 +12,7 @@ import net.hostsharing.hsadminng.hs.office.usecases.partner.CreatePartner;
import net.hostsharing.hsadminng.hs.office.usecases.debitor.DeleteDebitor;
import net.hostsharing.hsadminng.hs.office.usecases.partner.DeletePartner;
import net.hostsharing.hsadminng.hs.office.usecases.partner.AddRepresentativeToPartner;
import net.hostsharing.hsadminng.hs.office.usecases.subscription.RemoveOperationsContactFromPartner;
import net.hostsharing.hsadminng.hs.office.usecases.subscription.SubscribeToMailinglist;
import net.hostsharing.hsadminng.hs.office.usecases.subscription.UnsubscribeFromMailinglist;
import net.hostsharing.hsadminng.rbac.test.JpaAttempt;
@ -78,6 +79,15 @@ class HsOfficeUseCasesTest extends UseCaseTest {
.keep();
}
@Test
@Order(1039)
@Requires("Operations-Contact: Dennis Krause for Test AG")
void shouldRemoveOperationsContactFromPartner() {
new RemoveOperationsContactFromPartner(this)
.given("operationContactRelationUuid", "%{Operations-Contact: Dennis Krause for Test AG}")
.doRun();
}
@Test
@Order(1090)
void shouldDeletePartner() {

View File

@ -0,0 +1,20 @@
package net.hostsharing.hsadminng.hs.office.usecases.subscription;
import net.hostsharing.hsadminng.hs.office.usecases.UseCase;
import net.hostsharing.hsadminng.hs.office.usecases.UseCaseTest;
import static org.springframework.http.HttpStatus.NO_CONTENT;
public class RemoveOperationsContactFromPartner extends UseCase<RemoveOperationsContactFromPartner> {
public RemoveOperationsContactFromPartner(final UseCaseTest testSuite) {
super(testSuite);
}
@Override
protected HttpResponse run() {
return httpDelete("/api/hs/office/relations/" + uuid("operationContactRelationUuid"))
.expecting(NO_CONTENT);
}
}