eu.xtreemos.xosd.localallocmgr.test
Class TTElmTest

java.lang.Object
  extended by eu.xtreemos.xosd.localallocmgr.test.TTElmTest

public class TTElmTest
extends java.lang.Object


Constructor Summary
TTElmTest()
           
 
Method Summary
private static java.util.ArrayList<TTElm> complexishJoint()
          two sequential entries in the table, the third one starts during first one and ends during second one. result should give four elements, first one with owner1, second and third are aggregated and the last one is again with the owner2.
private static java.util.ArrayList<TTElm> complexishJoint2()
          sequential elements are used as a basis, an new one is added, which is a proper superset of both of them. should produce, two aggregated elements (the original ones + this one) and the remaining parts.
static java.util.ArrayList<TTElm> complexishJoint3()
          three elements, with time gap. adding new one, that starts before both of them, but ends somewhere in the middle of the third one.
static java.util.ArrayList<TTElm> isWrongAdd()
          create an element, add new one that starts at the same time as the first one, ends at the half of it.
static void main(java.lang.String[] args)
           
private static java.util.ArrayList<TTElm> simpleDisjoitTest()
           
static void simpleJoin()
           
private static java.util.ArrayList<TTElm> simpleJoint()
          test where the second element is added inside the first one (or the element above the existing) should produce 3 elms, first one with elm1 info, second one with aggregated info and the third one with elm1 info
private static java.util.ArrayList<TTElm> simpleSubsetTest()
          should create two elements, first one holding aggregated info, second one just the info from the first one
private static java.util.ArrayList<TTElm> simpleSubsetTest2()
          should create two elms, the second holding aggregated info, the first one just the info from the first one
static java.util.ArrayList<TTElm> sneakyFailureAdd()
          set three different elements, one after another, with gaps, set the first two as mutual and the third one as exclusive. than add the fourth element over all of them and the process must fail.
static void testRelations()
           
static void ttRemoveTest()
           
static void ttTest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TTElmTest

public TTElmTest()
Method Detail

simpleJoin

public static void simpleJoin()
                       throws TTElmJoinException
Throws:
TTElmJoinException

simpleDisjoitTest

private static java.util.ArrayList<TTElm> simpleDisjoitTest()

simpleSubsetTest

private static java.util.ArrayList<TTElm> simpleSubsetTest()
should create two elements, first one holding aggregated info, second one just the info from the first one

Returns:

simpleSubsetTest2

private static java.util.ArrayList<TTElm> simpleSubsetTest2()
should create two elms, the second holding aggregated info, the first one just the info from the first one

Returns:

simpleJoint

private static java.util.ArrayList<TTElm> simpleJoint()
test where the second element is added inside the first one (or the element above the existing) should produce 3 elms, first one with elm1 info, second one with aggregated info and the third one with elm1 info

Returns:

complexishJoint

private static java.util.ArrayList<TTElm> complexishJoint()
two sequential entries in the table, the third one starts during first one and ends during second one. result should give four elements, first one with owner1, second and third are aggregated and the last one is again with the owner2.

Returns:

complexishJoint2

private static java.util.ArrayList<TTElm> complexishJoint2()
sequential elements are used as a basis, an new one is added, which is a proper superset of both of them. should produce, two aggregated elements (the original ones + this one) and the remaining parts.

Returns:

complexishJoint3

public static java.util.ArrayList<TTElm> complexishJoint3()
three elements, with time gap. adding new one, that starts before both of them, but ends somewhere in the middle of the third one. should produce two aggregated elms, with first and fifth element equal to the last one. then an aggregated third and fourth are finished with the sole third elm.

Returns:

sneakyFailureAdd

public static java.util.ArrayList<TTElm> sneakyFailureAdd()
set three different elements, one after another, with gaps, set the first two as mutual and the third one as exclusive. than add the fourth element over all of them and the process must fail. the result should hold only the first three elements, the gaps and no sign of the fourth one.

Returns:

isWrongAdd

public static java.util.ArrayList<TTElm> isWrongAdd()
create an element, add new one that starts at the same time as the first one, ends at the half of it. Add third one that is the same as the second one.

Returns:

ttTest

public static void ttTest()
                   throws AttributeConformanceException
Throws:
AttributeConformanceException

ttRemoveTest

public static void ttRemoveTest()
                         throws AttributeConformanceException
Throws:
AttributeConformanceException

testRelations

public static void testRelations()
                          throws AttributeConformanceException
Throws:
AttributeConformanceException

main

public static void main(java.lang.String[] args)