|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
net.sf.jsefa.test.xml.PolymorphismTest
public class PolymorphismTest
Test for testing the correct serialization/deserialization with equally named elements of different data types.
Constructor Summary | |
---|---|
PolymorphismTest()
|
Method Summary | |
---|---|
void |
testElementForInstanceWithSameType()
Test with the following characteristics: 1. complex element which is top level (i. e. for which an entry point exists) 2. the type of the element is concrete (mapped to a concrete class) and has subtypes 3. the type of the element instance is the same as type of the element Expectations: The element instance gets no xsi:type attribute |
void |
testElementWithAbstractType()
Test with the following characteristics: 1. complex element which is top level (i. e. for which an entry point exists) 2. the type of the element is abstract (mapped to an interface) and has subtypes Expectations: The element instance gets an xsi:type attribute |
void |
testExceptionOnMultipleSubelementsWithInterferingTypeDTO()
Test with the following characteristics: 1. multiple complex elements which are sub elements of a top level element 2. the type of each element is a subtype or supertype of the types of the other elements 3. the elements have the same name Expectations: An IOFactoryException is thrown as the name of an element together with its type is ambiguous |
void |
testExceptionOnMultipleSubelementsWithSameConcreteTypeDTO()
Test with the following characteristics: 1. multiple complex elements which are sub elements of a top level element 2. each element as the same type 3. the elements have the same name Expectations: An IOFactoryException is thrown as the name of an element together with its type is ambiguous |
void |
testListItemsForFirstInstanceWithSameType()
Test with the following characteristics: 1. complex elements which are items of element list 2. the type of the elements is concrete (mapped to a concrete class) and has subtypes 3. only one element instance has the same type as the element Expectations: The one element instance gets no xsi:type attribute but the others do |
void |
testListItemsWithAbstractType()
Test with the following characteristics: 1. complex elements which are items of element list 2. the type of the elements is abstract (mapped to an interface) and has subtypes Expectations: Each element instance gets an xsi:type attribute |
void |
testMultipleSubelementsWithLeafTypes()
Test with the following characteristics: 1. multiple complex elements which are sub elements of a top level element 2. the different type of the elements do not have subtypes 3. the elements have the same name Expectations: Each element instance gets an xsi:type attribute |
void |
testSingleSubelementForInstanceWithSameType()
Test with the following characteristics: 1. complex element which is a sub element of a top level element 2. the type of the element is concrete (mapped to a concrete class) and has subtypes 3. the type of the element instance is the same as type of the element Expectations: The element instance gets no xsi:type attribute |
void |
testSingleSubelementWithAbstractType()
Test with the following characteristics: 1. complex element which is a sub element of a top level element 2. the type of the element is abstract (mapped to an interface) and has subtypes Expectations: The element instance gets an xsi:type attribute |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PolymorphismTest()
Method Detail |
---|
public void testElementWithAbstractType()
Expectations:
The element instance gets an xsi:type attribute
public void testElementForInstanceWithSameType()
3. the type of the element instance is the same as type of the element
Expectations:
The element instance gets no xsi:type attribute
public void testSingleSubelementWithAbstractType()
Expectations:
The element instance gets an xsi:type attribute
public void testSingleSubelementForInstanceWithSameType()
3. the type of the element instance is the same as type of the element
Expectations:
The element instance gets no xsi:type attribute
public void testMultipleSubelementsWithLeafTypes()
public void testExceptionOnMultipleSubelementsWithSameConcreteTypeDTO()
public void testExceptionOnMultipleSubelementsWithInterferingTypeDTO()
public void testListItemsWithAbstractType()
Expectations:
Each element instance gets an xsi:type attribute
public void testListItemsForFirstInstanceWithSameType()
3. only one element instance has the same type as the element
Expectations:
The one element instance gets no xsi:type attribute but the others do
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |