Tweak to test data builder
This commit is contained in:
parent
cc92bd7b07
commit
f3c023bb6f
|
@ -107,10 +107,12 @@ public interface ITestDataBuilder {
|
|||
}
|
||||
|
||||
default <T extends IBaseResource> Consumer<T> withId(String theId) {
|
||||
return t -> {
|
||||
assertThat(theId, matchesPattern("[a-zA-Z0-9]+"));
|
||||
t.setId(theId);
|
||||
};
|
||||
assertThat(theId, matchesPattern("[a-zA-Z0-9-]+"));
|
||||
return t -> t.setId(theId);
|
||||
}
|
||||
|
||||
default <T extends IBaseResource> Consumer<T> withId(IIdType theId) {
|
||||
return withId(theId.getIdPart());
|
||||
}
|
||||
|
||||
default Consumer<IBaseResource> withTag(String theSystem, String theCode) {
|
||||
|
|
Loading…
Reference in New Issue