Class IndexSegmentStructuralChangeTester_Test
- java.lang.Object
-
- org.eclipse.emfforms.internal.core.services.segments.index.IndexSegmentStructuralChangeTester_Test
-
public class IndexSegmentStructuralChangeTester_Test extends java.lang.Object
JUnit tests forIndexSegmentStructuralChangeTester
.- Author:
- Lucas Koehler
-
-
Constructor Summary
Constructors Constructor Description IndexSegmentStructuralChangeTester_Test()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
Sets up a new index segment structural change tester for every test case.void
testIsApplicable()
void
testIsApplicableNullSegment()
void
testIsApplicableWrongSegmentType()
void
testIsStructureChangedAddMany()
void
testIsStructureChangedAddOnIndex()
void
testIsStructureChangedAddOnLowerIndexIrrelevant()
Tests that a change is indicated if a list element with lower index (e.g.void
testIsStructureChangedAddOnLowerIndexRelevant()
Tests that a change is indicated if a list element with lower index (e.g.void
testIsStructureChangedMove()
void
testIsStructureChangedRemoveIndexedObject()
void
testIsStructureChangedRemoveMany()
void
testIsStructureChangedRemoveOnLowerIndexIrrelevant()
Tests that a change is indicated if a list element with lower index (e.g.void
testIsStructureChangedRemoveOnLowerIndexRelevant()
Tests that a change is indicated if a list element with lower index (e.g.void
testIsStructureChangedTouchAtIndex()
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception
Sets up a new index segment structural change tester for every test case.- Throws:
java.lang.Exception
-
testIsStructureChangedRemoveIndexedObject
public void testIsStructureChangedRemoveIndexedObject() throws DatabindingFailedException
- Throws:
DatabindingFailedException
-
testIsStructureChangedRemoveOnLowerIndexRelevant
public void testIsStructureChangedRemoveOnLowerIndexRelevant() throws DatabindingFailedException
Tests that a change is indicated if a list element with lower index (e.g. 0) than the index of the segment (e.g. 1) is removed. This should trigger a change because remaining elements are moving up the list when an element with a lower index is removed. This is only true if there was an element at the index's position before the old element's removal.- Throws:
DatabindingFailedException
-
testIsStructureChangedRemoveOnLowerIndexIrrelevant
public void testIsStructureChangedRemoveOnLowerIndexIrrelevant() throws DatabindingFailedException
Tests that a change is indicated if a list element with lower index (e.g. 0) than the index of the segment (e.g. 1) is removed. This should trigger a change because remaining elements are moving up the list when an element with a lower index is removed. This is only true if there was an element at the index's position before the old element's removal.- Throws:
DatabindingFailedException
-
testIsStructureChangedAddOnLowerIndexRelevant
public void testIsStructureChangedAddOnLowerIndexRelevant() throws DatabindingFailedException
Tests that a change is indicated if a list element with lower index (e.g. 0) than the index of the segment (e.g. 1) is added. This should trigger a change because the old elements are moving down the list when an element with a lower index is added. This is only true, if the list is (now) big enough that there (now) is an element at the index's position.- Throws:
DatabindingFailedException
-
testIsStructureChangedAddOnLowerIndexIrrelevant
public void testIsStructureChangedAddOnLowerIndexIrrelevant() throws DatabindingFailedException
Tests that a change is indicated if a list element with lower index (e.g. 0) than the index of the segment (e.g. 1) is added. This should trigger a change because the old elements are moving down the list when an element with a lower index is added. This is only true, if the list is (now) big enough that there (now) is an element at the index's position.- Throws:
DatabindingFailedException
-
testIsStructureChangedAddOnIndex
public void testIsStructureChangedAddOnIndex() throws DatabindingFailedException
- Throws:
DatabindingFailedException
-
testIsStructureChangedTouchAtIndex
public void testIsStructureChangedTouchAtIndex() throws DatabindingFailedException
- Throws:
DatabindingFailedException
-
testIsStructureChangedAddMany
public void testIsStructureChangedAddMany() throws DatabindingFailedException
- Throws:
DatabindingFailedException
-
testIsStructureChangedRemoveMany
public void testIsStructureChangedRemoveMany() throws DatabindingFailedException
- Throws:
DatabindingFailedException
-
testIsStructureChangedMove
public void testIsStructureChangedMove() throws DatabindingFailedException
- Throws:
DatabindingFailedException
-
testIsApplicable
public void testIsApplicable()
-
testIsApplicableNullSegment
public void testIsApplicableNullSegment()
-
testIsApplicableWrongSegmentType
public void testIsApplicableWrongSegmentType()
-
-