use of org.eclipse.persistence.testing.models.relationshipmaintenance.Resource in project eclipselink by eclipse-ee4j.
the class TransparentIndirectionAddOverflowBehaviourTest method verify.
/*
* Checks to see that the names of the updated version and the origional are the same
*/
@Override
public void verify() {
FieldOffice cachedOffice2 = (FieldOffice) getSession().readObject(this.clone2);
SalesPerson cachedTransfer = (SalesPerson) getSession().readObject(this.transfer);
Resource cachedResource = (Resource) getSession().readObject(this.resource);
if (cachedOffice2.getSalespeople().contains(cachedTransfer)) {
throw new TestErrorException("Failed to replicate Set behavior for double add when tracking changes");
}
if (!cachedOffice2.getResources().contains(cachedResource)) {
throw new TestErrorException("Failed to replicate List behavior for double add when tracking changes");
}
}
use of org.eclipse.persistence.testing.models.relationshipmaintenance.Resource in project eclipselink by eclipse-ee4j.
the class TransparentIndirectionTest method verify.
/*
* Checks to see that the names of the updated version and the origional are the same
*/
@Override
public void verify() {
FieldOffice cachedOffice = (FieldOffice) getSession().readObject(this.clone);
FieldOffice cachedOffice2 = (FieldOffice) getSession().readObject(this.clone2);
SalesPerson cachedTransfer = (SalesPerson) getSession().readObject(this.transfer);
SalesPerson cachedTransfer2 = (SalesPerson) getSession().readObject(this.transfer2);
Resource cachedResource = (Resource) getSession().readObject(this.resource);
if (cachedOffice.getSalespeople().contains(cachedTransfer)) {
throw new TestErrorException("Failed to track changes from indirect list with transparent indirection");
}
if (!cachedOffice2.getSalespeople().contains(cachedTransfer)) {
throw new TestErrorException("Failed to track changes when new entire collection set with transparent indirection");
}
if (cachedOffice2.getSalespeople().contains(cachedTransfer2)) {
throw new TestErrorException("Failed to merge changes from indirect list with transparent indirection");
}
if (!cachedOffice.getSalespeople().contains(cachedTransfer2)) {
throw new TestErrorException("Failed to merge changes when new entire collection set with transparent indirection");
}
if (cachedOffice.getResources().contains(cachedResource)) {
throw new TestErrorException("Failed to track changes from indirect list without indirection");
}
if (!cachedOffice2.getResources().contains(cachedResource)) {
throw new TestErrorException("Failed to track changes when new entire collection set without indirection");
}
}
Aggregations