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,6 +18,9 @@
|
||||
*/
|
||||
package org.alfresco.util.schemacomp.model;
|
||||
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,12 +28,41 @@ import org.junit.Test;
|
||||
* Tests for the Sequence class.
|
||||
* @author Matt Ward
|
||||
*/
|
||||
public class SequenceTest
|
||||
public class SequenceTest extends DbObjectTestBase<Sequence>
|
||||
{
|
||||
@Ignore
|
||||
@Test
|
||||
public void noTestsRequired()
|
||||
private Sequence thisSequence;
|
||||
private Sequence thatSequence;
|
||||
|
||||
@Before
|
||||
public void setUp()
|
||||
{
|
||||
// No functionality over and above AbstractDbObject at present.
|
||||
thisSequence = new Sequence("this_sequence");
|
||||
thatSequence = new Sequence("that_sequence");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void acceptVisitor()
|
||||
{
|
||||
thisSequence.accept(visitor);
|
||||
|
||||
verify(visitor).visit(thisSequence);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sequence getThisObject()
|
||||
{
|
||||
return thisSequence;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sequence getThatObject()
|
||||
{
|
||||
return thatSequence;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doDiffTests()
|
||||
{
|
||||
// Nothing extra to diff.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user