use of com.blazebit.persistence.view.testsuite.update.embeddable.nested.model.SimpleIntIdEntityView in project blaze-persistence by Blazebit.
the class EntityViewUpdateMutableNestedEmbeddableMapsTest method assertSubviewEquals.
private void assertSubviewEquals(Map<String, IntIdEntity> entities, Map<String, SimpleIntIdEntityView> views) {
assertEquals(entities.size(), views.size());
Map<String, SimpleIntIdEntityView> unmatched = new HashMap<>(views);
for (Map.Entry<String, IntIdEntity> entry : entities.entrySet()) {
IntIdEntity value = entry.getValue();
SimpleIntIdEntityView view = unmatched.remove(entry.getKey());
if (view == null || !value.getId().equals(view.getId())) {
Assert.fail("Unmatched name object: " + value);
}
}
if (!unmatched.isEmpty()) {
Assert.fail("Unmatched views: " + unmatched);
}
}
Aggregations