use of io.crnk.core.mock.models.Memorandum in project crnk-framework by crnk-project.
the class RegistryEntryTest method onValidParentShouldReturnTrue.
@Test
public void onValidParentShouldReturnTrue() throws Exception {
// GIVEN
RegistryEntry thing = new RegistryEntry(newResourceEntry(Thing.class, "things"));
RegistryEntry document = new RegistryEntry(newResourceEntry(Document.class, "documents"));
document.setParentRegistryEntry(thing);
RegistryEntry memorandum = new RegistryEntry(newResourceEntry(Memorandum.class, "memorandum"));
memorandum.setParentRegistryEntry(document);
// WHEN
boolean result = memorandum.isParent(thing);
// THEN
assertThat(result).isTrue();
}
Aggregations