Skip to content
Snippets Groups Projects
Commit 19cce5fb authored by Martin Abel's avatar Martin Abel
Browse files

Adjustment of test7 (category.equals) to JPA standards.

parent cb5d2d4f
No related branches found
No related tags found
No related merge requests found
Pipeline #177242 passed
...@@ -277,10 +277,13 @@ class Lab02Test { ...@@ -277,10 +277,13 @@ class Lab02Test {
fail("Could not find equals method in Category entity"); fail("Could not find equals method in Category entity");
} }
List<?> categories = controller.getLab01Data().getCategories(); // *** TODO (Martin Abel, 2023-12-22): Adjustment to JPA standards ***
Object category1 = categories.get(0); // *** In Lab01, the categories are not yet persisted, so all category ***
Object category2 = categories.get(1); // *** IDs are not assigned (id = 0) and are therefore all identical. ***
assertEqualsImplementation(category1, category2); // List<?> categories = controller.getLab01Data().getCategories();
// Object category1 = categories.get(0);
// Object category2 = categories.get(1);
// assertEqualsImplementation(category1, category2);
if (answerEntity != null) { if (answerEntity != null) {
if (!hasEqualsMethod(answerEntity.getJavaType())) { if (!hasEqualsMethod(answerEntity.getJavaType())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment