* Test class for MappingRecursiveElement
*/
public class TestMappingRecursiveElement extends TestCase {
public void testRecursive() {
MappingRecursiveElement element = new MappingRecursiveElement("test", "foo.bar"); //$NON-NLS-1$ //$NON-NLS-2$
// test basics
assertTrue(element.isRecursive());
assertEquals("test", element.getName()); //$NON-NLS-1$
assertEquals("foo.bar", element.getMappingClass()); //$NON-NLS-1$
// test criteria
assertNull(element.getCriteria());
element.setCriteria("foo >= bar"); //$NON-NLS-1$
assertNotNull(element.getCriteria());
assertEquals("foo >= bar", element.getCriteria()); //$NON-NLS-1$
// test recursion depth
assertEquals(MappingNodeConstants.Defaults.DEFAULT_RECURSION_LIMIT.intValue(), element.getRecursionLimit());
assertFalse(element.throwExceptionOnRecurrsionLimit());
element.setRecursionLimit(3, true);
assertEquals(3, element.getRecursionLimit());
assertTrue(element.throwExceptionOnRecurrsionLimit());
}