@@ -0,0 +1,1350 @@
+/*%0A * This file is part of COMPASS. It is subject to the license terms in%0A * the LICENSE file found in the top-level directory of this distribution.%0A * (Also available at http://www.apache.org/licenses/LICENSE-2.0.txt)%0A * You may not use this file except in compliance with the License.%0A */%0Apackage de.dfki.asr.compass.model;%0A%0Aimport de.dfki.asr.compass.math.Vector3f;%0Aimport org.testng.annotations.Test;%0Aimport static org.testng.Assert.*;%0A%0Apublic class SceneNodeTest %7B%0A%0A%09@Test%0A%09public void sceneNodeIsChildShouldReturnFalse () %7B%0A%09%09SceneNode parent = new SceneNode();%0A%09%09SceneNode noChild = new SceneNode();%0A%09%09assertFalse(noChild.isChildOf(parent));%0A%09%7D%0A%0A%09@Test%0A%09public void sceneNodeIsChildShouldReturnTrue () %7B%0A%09%09SceneNode parent = new SceneNode();%0A%09%09SceneNode child = new SceneNode();%0A%09%09child.setParent(parent);%0A%09%09assertTrue(child.isChildOf(parent));%0A%09%7D%0A%0A%09@Test(expectedExceptions = IllegalArgumentException.class)%0A%09public void sceneNodeAddComponentShouldThrowIllegalArgument() %7B%0A%09%09SceneNode sceneNode = new SceneNode();%0A%09%09sceneNode.addComponent(null);%0A%09%7D%0A%0A%09@Test%0A%09public void sceneNodeWorldSpaceOfRootShouldBeLocal() %7B%0A%09%09SceneNode sceneNode = new SceneNode();%0A%09%09sceneNode.setLocalTranslation(new Vector3f(10.0f, 20.0f, 30.0f));%0A%09%09sceneNode.setLocalRoll(40.0);%0A%09%09assertEquals(sceneNode.getWorldSpaceTransform(), sceneNode.getLocalTransform());%0A%09%7D%0A%7D%0A

Test for childof SceneNode, addComponenta and worldspace transform of root