use of org.alfresco.util.schemacomp.DbProperty in project alfresco-repository by Alfresco.
the class SchemaTest method doDiffTests.
@Override
protected void doDiffTests() {
// We need to be warned if comparing, for example a version 500 schema with a
// version 501 schema.
inOrder.verify(comparisonUtils).compareSimple(new DbProperty(left, "version"), new DbProperty(right, "version"), ctx);
// In addition to the base class functionality, Schema.diff() compares
// the DbObjects held in the other schema with its own DbObjects.
inOrder.verify(comparisonUtils).compareCollections(left.objects, right.objects, ctx);
}
use of org.alfresco.util.schemacomp.DbProperty in project alfresco-repository by Alfresco.
the class DbObjectTestBase method canDiffObjects.
@Test
public void canDiffObjects() {
AbstractDbObject thisObject = getThisObject();
thisObject.setComparisonUtils(comparisonUtils);
AbstractDbObject thatObject = getThatObject();
thatObject.setComparisonUtils(comparisonUtils);
// Invoke the method under test
thisObject.diff(thatObject, ctx);
// The name of the object should be diffed
inOrder.verify(comparisonUtils).compareSimple(new DbProperty(thisObject, "name"), new DbProperty(thatObject, "name"), ctx);
// Then the doDiff() method should be processed...
doDiffTests();
}
use of org.alfresco.util.schemacomp.DbProperty in project alfresco-repository by Alfresco.
the class IndexTest method doDiffTests.
@Override
protected void doDiffTests() {
inOrder.verify(comparisonUtils).compareSimpleOrderedLists(new DbProperty(thisIndex, "columnNames"), new DbProperty(thatIndex, "columnNames"), ctx);
inOrder.verify(comparisonUtils).compareSimple(new DbProperty(thisIndex, "unique"), new DbProperty(thatIndex, "unique"), ctx);
}
use of org.alfresco.util.schemacomp.DbProperty in project alfresco-repository by Alfresco.
the class PrimaryKeyTest method doDiffTests.
@Override
protected void doDiffTests() {
inOrder.verify(comparisonUtils).compareSimpleOrderedLists(new DbProperty(thisPK, "columnNames"), new DbProperty(thatPK, "columnNames"), ctx);
inOrder.verify(comparisonUtils).compareSimpleOrderedLists(new DbProperty(thisPK, "columnOrders"), new DbProperty(thatPK, "columnOrders"), ctx);
}
use of org.alfresco.util.schemacomp.DbProperty in project alfresco-repository by Alfresco.
the class ForeignKey method doDiff.
@Override
protected void doDiff(DbObject right, DiffContext ctx) {
ForeignKey thatFK = (ForeignKey) right;
comparisonUtils.compareSimple(new DbProperty(this, "localColumn"), new DbProperty(thatFK, "localColumn"), ctx);
comparisonUtils.compareSimple(new DbProperty(this, "targetTable"), new DbProperty(thatFK, "targetTable"), ctx);
comparisonUtils.compareSimple(new DbProperty(this, "targetColumn"), new DbProperty(thatFK, "targetColumn"), ctx);
}
Aggregations