amend string representations in ImportOfficeData to new toString/toShortString implementations

This commit is contained in:
Michael Hoennig 2024-02-08 14:05:56 +01:00
parent 3261e92b2c
commit ecc91592b0

View File

@ -181,26 +181,26 @@ public class ImportOfficeData extends ContextBasedTest {
// no contacts yet => mostly null values
assertThat(toFormattedString(partners)).isEqualToIgnoringWhitespace("""
{
17=partner(null null, null),
20=partner(null null, null),
22=partner(null null, null),
99=partner(null null, null)
17=partner(P-10017: null null, null),
20=partner(P-10020: null null, null),
22=partner(P-11022: null null, null),
99=partner(P-19999: null null, null)
}
""");
assertThat(toFormattedString(contacts)).isEqualTo("{}");
assertThat(toFormattedString(debitors)).isEqualToIgnoringWhitespace("""
{
17=debitor(D-1001700: null null, null: mih),
20=debitor(D-1002000: null null, null: xyz),
22=debitor(D-1102200: null null, null: xxx),
99=debitor(D-1999900: null null, null: zzz)
17=debitor(D-1001700: P-10017, mih),
20=debitor(D-1002000: P-10020, xyz),
22=debitor(D-1102200: P-11022, xxx),
99=debitor(D-1999900: P-19999, zzz)
}
""");
assertThat(toFormattedString(memberships)).isEqualToIgnoringWhitespace("""
{
17=Membership(M-1001700, null null, null, D-1001700, [2000-12-06,), NONE),
20=Membership(M-1002000, null null, null, D-1002000, [2000-12-06,2016-01-01), UNKNOWN),
22=Membership(M-1102200, null null, null, D-1102200, [2021-04-01,), NONE)
17=Membership(M-1001700, P-10017, D-1001700, [2000-12-06,), NONE),
20=Membership(M-1002000, P-10020, D-1002000, [2000-12-06,2016-01-01), UNKNOWN),
22=Membership(M-1102200, P-11022, D-1102200, [2021-04-01,), NONE)
}
""");
}
@ -224,10 +224,10 @@ public class ImportOfficeData extends ContextBasedTest {
assertThat(toFormattedString(partners)).isEqualToIgnoringWhitespace("""
{
17=partner(NP Mellies, Michael: Herr Michael Mellies ),
20=partner(LP JM GmbH: Herr Philip Meyer-Contract , JM GmbH),
22=partner(?? Test PS: Petra Schmidt , Test PS),
99=partner(null null, null)
17=partner(P-10017: NP Mellies, Michael, Herr Michael Mellies ),
20=partner(P-10020: LP JM GmbH, Herr Philip Meyer-Contract , JM GmbH),
22=partner(P-11022: ?? Test PS, Petra Schmidt , Test PS),
99=partner(P-19999: null null, null)
}
""");
assertThat(toFormattedString(contacts)).isEqualToIgnoringWhitespace("""
@ -257,17 +257,17 @@ public class ImportOfficeData extends ContextBasedTest {
""");
assertThat(toFormattedString(debitors)).isEqualToIgnoringWhitespace("""
{
17=debitor(D-1001700: NP Mellies, Michael: mih),
20=debitor(D-1002000: LP JM GmbH: xyz),
22=debitor(D-1102200: ?? Test PS: xxx),
99=debitor(D-1999900: null null, null: zzz)
17=debitor(D-1001700: P-10017, mih),
20=debitor(D-1002000: P-10020, xyz),
22=debitor(D-1102200: P-11022, xxx),
99=debitor(D-1999900: P-19999, zzz)
}
""");
assertThat(toFormattedString(memberships)).isEqualToIgnoringWhitespace("""
{
17=Membership(M-1001700, NP Mellies, Michael, D-1001700, [2000-12-06,), NONE),
20=Membership(M-1002000, LP JM GmbH, D-1002000, [2000-12-06,2016-01-01), UNKNOWN),
22=Membership(M-1102200, ?? Test PS, D-1102200, [2021-04-01,), NONE)
17=Membership(M-1001700, P-10017, D-1001700, [2000-12-06,), NONE),
20=Membership(M-1002000, P-10020, D-1002000, [2000-12-06,2016-01-01), UNKNOWN),
22=Membership(M-1102200, P-11022, D-1102200, [2021-04-01,), NONE)
}
""");
assertThat(toFormattedString(relationships)).isEqualToIgnoringWhitespace("""
@ -313,9 +313,9 @@ public class ImportOfficeData extends ContextBasedTest {
assertThat(toFormattedString(bankAccounts)).isEqualToIgnoringWhitespace("""
{
234234=bankAccount(holder='Michael Mellies', iban='DE37500105177419788228', bic='INGDDEFFXXX'),
235600=bankAccount(holder='JM e.K.', iban='DE02300209000106531065', bic='CMCIDEDD'),
235662=bankAccount(holder='JM GmbH', iban='DE49500105174516484892', bic='INGDDEFFXXX')
234234=bankAccount(DE37500105177419788228: holder='Michael Mellies', bic='INGDDEFFXXX'),
235600=bankAccount(DE02300209000106531065: holder='JM e.K.', bic='CMCIDEDD'),
235662=bankAccount(DE49500105174516484892: holder='JM GmbH', bic='INGDDEFFXXX')
}
""");
assertThat(toFormattedString(sepaMandates)).isEqualToIgnoringWhitespace("""