assertEquals(0, parent.getChildCount());
int numChildren = Math.round(ToolsMath.getRandom(1, 10));
assertTrue("children created and added: " + numChildren + " -> >= 1 && <= 10", numChildren >= 1 && numChildren <= 10);
for (int i = 0; i < numChildren; i++) {
MTComponent newChild = new MTComponent(app);
parent.addChild(newChild);
}
assertTrue("children list not emtpy", parent.getChildren().length > 0);
assertEquals("parent Childcount == created children number", numChildren, parent.getChildCount());
MTComponent first = parent.getChildByIndex(0);
//parent.sendChildToFront(first);
first.sendToFront();
MTComponent last = parent.getChildByIndex(parent.getChildCount()-1);
assertEquals("Sent first to front (last) - is it there now?" , first, last);
int id = first.getID();
MTComponent childByID = parent.getChildbyID(id);
assertEquals(first, childByID);
assertTrue(parent.containsChild(first));
assertTrue(parent.containsDirectChild(first));