using a proper displayLabel for the parent SepaMandate->Customer (HOWTO)
Unfortunately without a test for the HTML template changes of the Angular components because these seem to come only with Protractor, which we had not configured in JHipster.
This commit is contained in:
@ -57,6 +57,7 @@ public class SepaMandateDTOIntTest {
|
||||
private static final Integer SOME_CUSTOMER_REFERENCE = 10001;
|
||||
private static final String SOME_CUSTOMER_PREFIX = "abc";
|
||||
private static final String SOME_CUSTOMER_NAME = "Some Customer Name";
|
||||
private static final String SOME_CUSTOMER_DISPLAY_LABEL = "Some Customer Name [10001:abc]";
|
||||
private static final Customer SOME_CUSTOMER = new Customer().id(SOME_CUSTOMER_ID)
|
||||
.reference(SOME_CUSTOMER_REFERENCE).prefix(SOME_CUSTOMER_PREFIX).name(SOME_CUSTOMER_NAME);
|
||||
|
||||
@ -164,7 +165,7 @@ public class SepaMandateDTOIntTest {
|
||||
expected.setId(SOME_SEPA_MANDATE_ID);
|
||||
expected.setCustomerId(SOME_CUSTOMER_ID);
|
||||
expected.setRemark("Updated Remark");
|
||||
expected.setCustomerPrefix(SOME_CUSTOMER_PREFIX);
|
||||
expected.setCustomerDisplayLabel(SOME_CUSTOMER_DISPLAY_LABEL);
|
||||
assertThat(actual).isEqualToIgnoringGivenFields(expected, "displayLabel");
|
||||
}
|
||||
|
||||
@ -183,7 +184,7 @@ public class SepaMandateDTOIntTest {
|
||||
.withFieldValueIfPresent("lastUsedDate", Objects.toString(dto.getLastUsedDate()))
|
||||
.withFieldValueIfPresent("remark", dto.getRemark())
|
||||
.withFieldValueIfPresent("customerId", dto.getCustomerId())
|
||||
.withFieldValue("customerPrefix", dto.getCustomerPrefix())
|
||||
.withFieldValue("customerDisplayLabel", dto.getCustomerDisplayLabel())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class SepaMandateDTOUnitTest extends AccessMappingsUnitTestBase<SepaManda
|
||||
"validUntilDate", "revokationDocumentDate");
|
||||
readAccessFor(SepaMandateDTO.class, Role.CONTRACTUAL_CONTACT).shouldBeExactlyFor(
|
||||
"grantingDocumentDate", "bic", "id", "validUntilDate", "customerId", "validFromDate", "iban",
|
||||
"revokationDocumentDate", "customerPrefix", "lastUsedDate", "reference");
|
||||
"revokationDocumentDate", "customerDisplayLabel", "lastUsedDate", "reference");
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -72,7 +72,7 @@ public class SepaMandateDTOUnitTest extends AccessMappingsUnitTestBase<SepaManda
|
||||
dto.setBic("BIC1234");
|
||||
dto.setRemark("Some Remark");
|
||||
dto.setCustomerId(parentId);
|
||||
dto.setCustomerPrefix("abc");
|
||||
dto.setCustomerDisplayLabel("abc");
|
||||
return dto;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ public class SepaMandateDTOUnitTest extends AccessMappingsUnitTestBase<SepaManda
|
||||
dto.setBic(RandomStringUtils.randomAlphanumeric(10).toUpperCase());
|
||||
dto.setRemark(RandomStringUtils.randomAlphanumeric(20).toUpperCase());
|
||||
dto.setCustomerId(parentId);
|
||||
dto.setCustomerPrefix(RandomStringUtils.randomAlphabetic(3).toLowerCase());
|
||||
dto.setCustomerDisplayLabel(RandomStringUtils.randomAlphabetic(3).toLowerCase());
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ public class SepaMandateResourceIntTest {
|
||||
|
||||
// Create the SepaMandate
|
||||
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate);
|
||||
sepaMandateDTO.setCustomerPrefix(null);
|
||||
sepaMandateDTO.setCustomerDisplayLabel(null);
|
||||
sepaMandateDTO.setRemark(null);
|
||||
sepaMandateDTO.setRevokationDocumentDate(null);
|
||||
sepaMandateDTO.setLastUsedDate(null);
|
||||
|
Reference in New Issue
Block a user