From 19cce5fb8a1894522e84f54dec2f6cd4fd598b63 Mon Sep 17 00:00:00 2001 From: Martin Abel <martin.abel@h-da.de> Date: Fri, 22 Dec 2023 18:11:52 +0100 Subject: [PATCH] Adjustment of test7 (category.equals) to JPA standards. --- src/test/java/de/hda/fbi/db2/test/Lab02Test.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/test/java/de/hda/fbi/db2/test/Lab02Test.java b/src/test/java/de/hda/fbi/db2/test/Lab02Test.java index 7019d5b..df06581 100644 --- a/src/test/java/de/hda/fbi/db2/test/Lab02Test.java +++ b/src/test/java/de/hda/fbi/db2/test/Lab02Test.java @@ -277,10 +277,13 @@ class Lab02Test { fail("Could not find equals method in Category entity"); } - List<?> categories = controller.getLab01Data().getCategories(); - Object category1 = categories.get(0); - Object category2 = categories.get(1); - assertEqualsImplementation(category1, category2); + // *** TODO (Martin Abel, 2023-12-22): Adjustment to JPA standards *** + // *** In Lab01, the categories are not yet persisted, so all category *** + // *** IDs are not assigned (id = 0) and are therefore all identical. *** + // List<?> categories = controller.getLab01Data().getCategories(); + // Object category1 = categories.get(0); + // Object category2 = categories.get(1); + // assertEqualsImplementation(category1, category2); if (answerEntity != null) { if (!hasEqualsMethod(answerEntity.getJavaType())) { -- GitLab