From cebba7fe2403ad9e03222895a7b5325dbcf12530 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Sat, 3 Aug 2024 19:13:41 +0200 Subject: [PATCH] add @test verifyMembershipsActuallyPersisted --- .../hsadminng/hs/migration/ImportOfficeData.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java index ef30add4..64d7e4cb 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java @@ -693,6 +693,13 @@ public class ImportOfficeData extends CsvDataImport { } + @Test + @Order(9190) + void verifyMembershipsActuallyPersisted() { + final var biCount = (Integer) em.createNativeQuery("SELECT count(*) FROM hs_office_membership", Integer.class).getSingleResult(); + assertThat(biCount).isGreaterThan(isImportingControlledTestData() ? 5 : 300); + } + protected void assumeThatWeAreExplicitlyImportingOfficeData() { // not throwing AssumptionException }