mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-10771: adding validation to schema compare tool
Added support to DbObjects to accept visitors Added ValidatingVisitor to invoke suitable validator on each DbObject Added NameValidator and NullValidator to operate on DbObject types Added test suites git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31494 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,15 +18,17 @@
|
||||
*/
|
||||
package org.alfresco.util.schemacomp.model;
|
||||
|
||||
import static org.mockito.Mockito.inOrder;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.util.schemacomp.ComparisonUtils;
|
||||
import org.alfresco.util.schemacomp.DbObjectVisitor;
|
||||
import org.alfresco.util.schemacomp.DiffContext;
|
||||
import org.alfresco.util.schemacomp.Differences;
|
||||
import org.alfresco.util.schemacomp.Result.Strength;
|
||||
import org.alfresco.util.schemacomp.ValidationResult;
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -50,14 +52,15 @@ public abstract class DbObjectTestBase<T extends AbstractDbObject>
|
||||
protected InOrder inOrder;
|
||||
protected abstract T getThisObject();
|
||||
protected abstract T getThatObject();
|
||||
protected @Mock DbObjectVisitor visitor;
|
||||
|
||||
@Before
|
||||
public void baseSetUp()
|
||||
public final void baseSetUp()
|
||||
{
|
||||
// Check that the correct calls happened in the correct order.
|
||||
List<Object> mocks = getMocksUsedInDiff();
|
||||
inOrder = inOrder(mocks.toArray());
|
||||
ctx = new DiffContext(dialect, differences);
|
||||
ctx = new DiffContext(dialect, differences, new ArrayList<ValidationResult>());
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user