add D- in front of memberNumber - ScenarioTest fixed
This commit is contained in:
parent
42cafef768
commit
378d0e0c16
@ -8,8 +8,9 @@ import net.hostsharing.hsadminng.hs.office.scenarios.contact.ReplaceContactData;
|
|||||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.CreateExternalDebitorForPartner;
|
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.CreateExternalDebitorForPartner;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.CreateSelfDebitorForPartner;
|
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.CreateSelfDebitorForPartner;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.CreateSepaMandateForDebitor;
|
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.CreateSepaMandateForDebitor;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.FinallyDeleteSepaMandateForDebitor;
|
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.DeleteDebitor;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.DontDeleteDefaultDebitor;
|
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.DontDeleteDefaultDebitor;
|
||||||
|
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.FinallyDeleteSepaMandateForDebitor;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.debitor.InvalidateSepaMandateForDebitor;
|
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.CancelMembership;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.membership.CreateMembership;
|
import net.hostsharing.hsadminng.hs.office.scenarios.membership.CreateMembership;
|
||||||
@ -20,10 +21,9 @@ import net.hostsharing.hsadminng.hs.office.scenarios.membership.coopshares.Creat
|
|||||||
import net.hostsharing.hsadminng.hs.office.scenarios.membership.coopshares.CreateCoopSharesRevertTransaction;
|
import net.hostsharing.hsadminng.hs.office.scenarios.membership.coopshares.CreateCoopSharesRevertTransaction;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.membership.coopshares.CreateCoopSharesSubscriptionTransaction;
|
import net.hostsharing.hsadminng.hs.office.scenarios.membership.coopshares.CreateCoopSharesSubscriptionTransaction;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.partner.AddOperationsContactToPartner;
|
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.partner.AddRepresentativeToPartner;
|
||||||
|
import net.hostsharing.hsadminng.hs.office.scenarios.partner.CreatePartner;
|
||||||
|
import net.hostsharing.hsadminng.hs.office.scenarios.partner.DeletePartner;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.person.ShouldUpdatePersonData;
|
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.RemoveOperationsContactFromPartner;
|
||||||
import net.hostsharing.hsadminng.hs.office.scenarios.subscription.SubscribeToMailinglist;
|
import net.hostsharing.hsadminng.hs.office.scenarios.subscription.SubscribeToMailinglist;
|
||||||
@ -77,7 +77,8 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(1011)
|
@Order(1011)
|
||||||
@Produces(explicitly = "Partner: P-31011 - Michelle Matthieu", implicitly = {"Person: Michelle Matthieu", "Contact: Michelle Matthieu"})
|
@Produces(explicitly = "Partner: P-31011 - Michelle Matthieu", implicitly = { "Person: Michelle Matthieu",
|
||||||
|
"Contact: Michelle Matthieu" })
|
||||||
void shouldCreateNaturalPersonAsPartner() {
|
void shouldCreateNaturalPersonAsPartner() {
|
||||||
new CreatePartner(this)
|
new CreatePartner(this)
|
||||||
.given("partnerNumber", "P-31011")
|
.given("partnerNumber", "P-31011")
|
||||||
@ -218,9 +219,9 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
|||||||
@Test
|
@Test
|
||||||
@Order(2010)
|
@Order(2010)
|
||||||
@Requires("Partner: P-31010 - Test AG")
|
@Requires("Partner: P-31010 - Test AG")
|
||||||
@Produces("Debitor: Test AG - main debitor")
|
@Produces("Debitor: D-3101000 - Test AG - main debitor")
|
||||||
void shouldCreateSelfDebitorForPartner() {
|
void shouldCreateSelfDebitorForPartner() {
|
||||||
new CreateSelfDebitorForPartner(this, "Debitor: Test AG - main debitor")
|
new CreateSelfDebitorForPartner(this)
|
||||||
.given("partnerPersonTradeName", "Test AG")
|
.given("partnerPersonTradeName", "Test AG")
|
||||||
.given("billingContactCaption", "Test AG - billing department")
|
.given("billingContactCaption", "Test AG - billing department")
|
||||||
.given("billingContactEmailAddress", "billing@test-ag.example.org")
|
.given("billingContactEmailAddress", "billing@test-ag.example.org")
|
||||||
@ -238,7 +239,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
|||||||
@Test
|
@Test
|
||||||
@Order(2011)
|
@Order(2011)
|
||||||
@Requires("Person: Test AG")
|
@Requires("Person: Test AG")
|
||||||
@Produces("Debitor: D-3101000 - Test AG - main debitor")
|
@Produces("Debitor: D-3101001 - Test AG - main debitor")
|
||||||
void shouldCreateExternalDebitorForPartner() {
|
void shouldCreateExternalDebitorForPartner() {
|
||||||
new CreateExternalDebitorForPartner(this)
|
new CreateExternalDebitorForPartner(this)
|
||||||
.given("partnerPersonTradeName", "Test AG")
|
.given("partnerPersonTradeName", "Test AG")
|
||||||
@ -258,6 +259,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
|||||||
@Test
|
@Test
|
||||||
@Order(2020)
|
@Order(2020)
|
||||||
@Requires("Person: Test AG")
|
@Requires("Person: Test AG")
|
||||||
|
@Produces(explicitly = "Debitor: D-3101000 - Test AG - delete debitor", permanent = false)
|
||||||
void shouldDeleteDebitor() {
|
void shouldDeleteDebitor() {
|
||||||
new DeleteDebitor(this)
|
new DeleteDebitor(this)
|
||||||
.given("partnerNumber", "P-31020")
|
.given("partnerNumber", "P-31020")
|
||||||
|
@ -12,4 +12,5 @@ public @interface Produces {
|
|||||||
String value() default ""; // same as explicitly, makes it possible to omit the property name
|
String value() default ""; // same as explicitly, makes it possible to omit the property name
|
||||||
String explicitly() default ""; // same as value
|
String explicitly() default ""; // same as value
|
||||||
String[] implicitly() default {};
|
String[] implicitly() default {};
|
||||||
|
boolean permanent() default true; // false means that the object gets deleted again in the process
|
||||||
}
|
}
|
||||||
|
@ -113,6 +113,8 @@ public abstract class ScenarioTest extends ContextBasedTest {
|
|||||||
// and it does not produce anything we already have (would cause errors)
|
// and it does not produce anything we already have (would cause errors)
|
||||||
SetUtils.intersection(testMethodProduces, knowVariables().keySet()).isEmpty()
|
SetUtils.intersection(testMethodProduces, knowVariables().keySet()).isEmpty()
|
||||||
) {
|
) {
|
||||||
|
assertThat(producesAnnot.permanent()).as("cannot depend on non-permanent producer: " + potentialProducerMethod);
|
||||||
|
|
||||||
// then we recursively produce the pre-requisites of the producer method
|
// then we recursively produce the pre-requisites of the producer method
|
||||||
callRequiredProducers(potentialProducerMethod);
|
callRequiredProducers(potentialProducerMethod);
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ import static org.springframework.http.HttpStatus.OK;
|
|||||||
|
|
||||||
public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPartner> {
|
public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPartner> {
|
||||||
|
|
||||||
public CreateSelfDebitorForPartner(final ScenarioTest testSuite, final String resultAlias) {
|
public CreateSelfDebitorForPartner(final ScenarioTest testSuite) {
|
||||||
super(testSuite, resultAlias);
|
super(testSuite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,7 +9,7 @@ public class DeleteDebitor extends UseCase<DeleteDebitor> {
|
|||||||
public DeleteDebitor(final ScenarioTest testSuite) {
|
public DeleteDebitor(final ScenarioTest testSuite) {
|
||||||
super(testSuite);
|
super(testSuite);
|
||||||
|
|
||||||
requires("Debitor: Test AG - delete debitor", alias -> new CreateSelfDebitorForPartner(testSuite, alias)
|
requires("Debitor: Test AG - delete debitor", alias -> new CreateSelfDebitorForPartner(testSuite)
|
||||||
.given("partnerPersonTradeName", "Test AG")
|
.given("partnerPersonTradeName", "Test AG")
|
||||||
.given("billingContactCaption", "Test AG - billing department")
|
.given("billingContactCaption", "Test AG - billing department")
|
||||||
.given("billingContactEmailAddress", "billing@test-ag.example.org")
|
.given("billingContactEmailAddress", "billing@test-ag.example.org")
|
||||||
|
Loading…
Reference in New Issue
Block a user