*/
public void testInterfaceWithoutDiscriminator()
{
try {
String[] files = {"./src/test/test-config/jcrmapping-inheritance.xml"};
Mapper mapper = new DigesterMapperImpl(files);
assertNotNull("Mapper is null", mapper);
ClassDescriptor classDescriptor = mapper.getClassDescriptorByClass(CmsObject.class);
assertNotNull("Classdescriptor is null", classDescriptor);
assertTrue("CmsObject is not an interface", classDescriptor.isInterface());
assertFalse("Interface has a discriminator", classDescriptor.hasDiscriminator());
String[] mixinTypes = classDescriptor.getJcrMixinTypes();
assertEquals("Invalid mixin type for the interface",mixinTypes.length , 0);
assertNull("The interface has an ancestor", classDescriptor.getSuperClassDescriptor());
assertTrue("The interface has not implementation/descendant", classDescriptor.hasDescendants());
Collection descendants = classDescriptor.getDescendantClassDescriptors();
assertEquals("Invalid number of implementation/descendants", descendants.size(),3);
assertFalse("Invalid extend strategy", classDescriptor.usesNodeTypePerHierarchyStrategy());
assertTrue("Invalid extend strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
classDescriptor = mapper.getClassDescriptorByClass(Document.class);
assertNotNull("Classdescriptor is null", classDescriptor);
assertTrue("Document is not an interface", classDescriptor.isInterface());
assertFalse("Document has a discriminator", classDescriptor.hasDiscriminator());
assertEquals("Invalid number of implemented interface", classDescriptor.getImplements().size(), 0);
assertFalse("Invalid extend strategy", classDescriptor.usesNodeTypePerHierarchyStrategy());
assertTrue("Invalid extend strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
descendants = classDescriptor.getDescendantClassDescriptors();
assertEquals("Invalid number of implementation/descendants", descendants.size(),1);
classDescriptor = mapper.getClassDescriptorByClass(DocumentImpl.class);
assertNotNull("Classdescriptor is null", classDescriptor);
assertFalse("DocumentImpl is an interface", classDescriptor.isInterface());
assertFalse("DocumentImpl has a discriminator", classDescriptor.hasDiscriminator());
assertTrue("DocumentImpl has not interface", classDescriptor.hasInterfaces());
assertEquals("Invalid number of implemented interface", classDescriptor.getImplements().size(), 1);