use of com.blazebit.persistence.view.testsuite.collections.subview.model.SubviewDocumentCollectionsView in project blaze-persistence by Blazebit.
the class NestedCollectionsTest method assertSubviewCollectionEquals.
private void assertSubviewCollectionEquals(Set<DocumentForCollections> ownedDocuments, Set<? extends SubviewDocumentCollectionsView> ownedSubviewDocuments) {
assertEquals(ownedDocuments.size(), ownedSubviewDocuments.size());
for (DocumentForCollections doc : ownedDocuments) {
boolean found = false;
for (SubviewDocumentCollectionsView docSub : ownedSubviewDocuments) {
if (doc.getName().equals(docSub.getName())) {
found = true;
assertSubviewEquals(doc.getContacts(), docSub.getContacts());
assertSubviewEquals(doc.getPartners(), docSub.getPartners());
assertSubviewEquals(doc.getPersonList(), docSub.getPersonList());
break;
}
}
if (!found) {
Assert.fail("Could not find a SubviewDocumentCollectionsView with the name: " + doc.getName());
}
}
}
use of com.blazebit.persistence.view.testsuite.collections.subview.model.SubviewDocumentCollectionsView in project blaze-persistence by Blazebit.
the class NestedEmptyCollectionsTest method assertSubviewCollectionEquals.
private void assertSubviewCollectionEquals(Set<DocumentForCollections> ownedDocuments, Set<? extends SubviewDocumentCollectionsView> ownedSubviewDocuments) {
assertEquals(ownedDocuments.size(), ownedSubviewDocuments.size());
for (DocumentForCollections doc : ownedDocuments) {
boolean found = false;
for (SubviewDocumentCollectionsView docSub : ownedSubviewDocuments) {
if (doc.getName().equals(docSub.getName())) {
found = true;
assertSubviewEquals(doc.getContacts(), docSub.getContacts());
assertSubviewEquals(doc.getPartners(), docSub.getPartners());
assertSubviewEquals(doc.getPersonList(), docSub.getPersonList());
break;
}
}
if (!found) {
Assert.fail("Could not find a SubviewDocumentCollectionsView with the name: " + doc.getName());
}
}
}
Aggregations