hierarchical-validation-baseline #59
No reviewers
Labels
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hostsharing/hs.hsadmin.ng#59
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "hierarchical-validation-baseline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -59,2 +64,3 @@
final var saved = bookingItemRepo.save(valid(entityToSave));
final HsBookingItemEntity entityToSave1 = bookingItemRepo.save(entityToSave);
final var saved = HsBookingItemEntityValidatorRegistry.validated(entityToSave1);
variable inlinen
@ -78,6 +84,7 @@ public class HsBookingItemController implements HsBookingItemsApi {
context.define(currentUser, assumedRoles);
final var result = bookingItemRepo.findByUuid(bookingItemUuid);
result.ifPresent(entity -> em.detach(entity));
comment would be nice
@ -0,0 +23,4 @@
return sequentiallyValidate(
() -> enrich(prefix(bookingItem.toShortString(), "resources"), validateProperties(bookingItem.getResources())),
() -> enrich(prefix(bookingItem.toShortString(), "parentItem"), optionallyValidate(bookingItem.getParentItem())),
() -> validateAgainstSubEntities(bookingItem)
enrich?
@ -64,2 +63,3 @@
final var saved = assetRepo.save(valid(entityToSave));
final HsHostingAssetEntity persistentEntity = assetRepo.save(entityToSave);
final var saved = HsHostingAssetEntityValidatorRegistry.validated(persistentEntity);
evtl. zusammenfassen
@ -119,2 +119,3 @@
final var saved = assetRepo.save(valid(current));
final HsHostingAssetEntity persistentEntity = assetRepo.save(current);
final var saved = HsHostingAssetEntityValidatorRegistry.validated(persistentEntity);
zusammenfassen
@ -0,0 +38,4 @@
// then
assertThat(result).isInstanceOf(ValidationException.class)
.hasMessageContaining(
"D-12345:test project:Test-Server.resources.CPUs' is required but missing",
Hochkomma vorne einfügen