Skip to content

Commit

Permalink
Adapt test to changed handling of hidden items
Browse files Browse the repository at this point in the history
LookupTableType.row is now present but marked as incomplete.
  • Loading branch information
mederly committed Jan 17, 2020
1 parent 5d1d692 commit f3767f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Expand Up @@ -1241,9 +1241,17 @@ public static <O extends Objectable> void assertEquivalent(String message, ItemP
}
}

public static void assertIncomplete(PrismObject<?> object, ItemPath itemPath) {
@SuppressWarnings("UnusedReturnValue")
public static Item<?, ?> assertEmptyAndIncomplete(PrismObject<?> object, ItemPath itemPath) {
Item<?, ?> item = assertIncomplete(object, itemPath);
assertTrue(itemPath + " has values in " + object + ": " + item, item.hasNoValues());
return item;
}

public static Item<?, ?> assertIncomplete(PrismObject<?> object, ItemPath itemPath) {
Item<?, ?> item = object.findItem(itemPath);
assertNotNull("No " + itemPath + " in " + object, item);
assertTrue(itemPath + " is not incomplete in " + object, item.isIncomplete());
return item;
}
}
Expand Up @@ -116,8 +116,7 @@ public void test100LookupLanguagesGet() throws Exception {

assertEquals("Wrong lang lookup name", LOOKUP_LANGUAGES_NAME, lookup.asObjectable().getName().getOrig());

PrismContainer<LookupTableRowType> tableContainer = lookup.findContainer(LookupTableType.F_ROW);
assertNull("Table container sneaked in", tableContainer);
PrismAsserts.assertEmptyAndIncomplete(lookup, LookupTableType.F_ROW);

assertSteadyResources();
}
Expand Down Expand Up @@ -148,8 +147,7 @@ public void test102LookupLanguagesGetExclude() throws Exception {

assertEquals("Wrong lang lookup name", LOOKUP_LANGUAGES_NAME, lookup.asObjectable().getName().getOrig());

PrismContainer<LookupTableRowType> tableContainer = lookup.findContainer(LookupTableType.F_ROW);
assertNull("Table container sneaked in", tableContainer);
PrismAsserts.assertEmptyAndIncomplete(lookup, LookupTableType.F_ROW);

assertSteadyResources();
}
Expand Down

0 comments on commit f3767f2

Please sign in to comment.