From 7d7d99c05b79744c7746843b096720b2b968041a Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Mon, 1 Jul 2024 12:00:30 +0200 Subject: [PATCH] revert unnecessary changes --- .../HsCloudServerHostingAssetValidatorUnitTest.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsCloudServerHostingAssetValidatorUnitTest.java b/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsCloudServerHostingAssetValidatorUnitTest.java index ac9541bb..69fe01bb 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsCloudServerHostingAssetValidatorUnitTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/hosting/asset/validators/HsCloudServerHostingAssetValidatorUnitTest.java @@ -68,11 +68,11 @@ class HsCloudServerHostingAssetValidatorUnitTest { @Test void validatesBookingItemType() { // given - final var mangedServerHostingAssetEntity = linkBookingItem(HsHostingAssetEntity.builder() + final var mangedServerHostingAssetEntity = HsHostingAssetEntity.builder() .type(MANAGED_SERVER) .identifier("xyz00") - .bookingItem(TEST_CLOUD_SERVER_BOOKING_ITEM.toBuilder().build()) - .build()); + .bookingItem(HsBookingItemEntity.builder().type(HsBookingItemType.CLOUD_SERVER).build()) + .build(); final var validator = HsHostingAssetEntityValidatorRegistry.forType(mangedServerHostingAssetEntity.getType()); // when @@ -103,9 +103,4 @@ class HsCloudServerHostingAssetValidatorUnitTest { "'CLOUD_SERVER:xyz00.parentAsset' must be null but is set to D-???????-?:null", "'CLOUD_SERVER:xyz00.assignedToAsset' must be null but is set to D-???????-?:null"); } - - private static HsHostingAssetEntity linkBookingItem(final HsHostingAssetEntity mangedServerHostingAssetEntity) { - mangedServerHostingAssetEntity.getBookingItem().setRelatedHostingAsset(mangedServerHostingAssetEntity); - return mangedServerHostingAssetEntity; - } }