Package barsuift.simLife.universe

Examples of barsuift.simLife.universe.MockUniverse


        }
    }

    public void testGetState() {
        TreeTrunkState trunkState = CoreDataCreatorForTests.createSpecificTreeTrunkState();
        BasicTreeTrunk treeTrunk = new BasicTreeTrunk(new MockUniverse(), trunkState);
        assertEquals(4.0f, treeTrunk.getHeight());
        assertEquals(0.5f, treeTrunk.getRadius());

        assertEquals(trunkState, treeTrunk.getState());
        assertSame(trunkState, treeTrunk.getState());
View Full Code Here


    }

    public void testSpendTime() {
        TreeTrunkState trunkState = new TreeTrunkState();
        trunkState.setAge(12);
        BasicTreeTrunk treeTrunk = new BasicTreeTrunk(new MockUniverse(), trunkState);
        treeTrunk.spendTime();
        assertEquals(13, treeTrunk.getAge());
    }
View Full Code Here

    private MockUniverse mockUniverse;

    protected void setUp() throws Exception {
        super.setUp();
        mockUniverse = new MockUniverse();
        controller = new UniverseTimeController(mockUniverse);
    }
View Full Code Here

        assertTrue(root.getCapability(Group.ALLOW_CHILDREN_EXTEND));
    }

    public void testInitFromUniverse() {
        BasicUniverse3D universe3D = new BasicUniverse3D();
        Universe universe = new MockUniverse();
        MockTreeLeaf treeLeaf = new MockTreeLeaf();
        treeLeaf.setState(CoreDataCreatorForTests.createSpecificTreeLeafState());
        universe.addFallenLeaf(treeLeaf);
        MockTree tree = new MockTree();
        tree.setState(CoreDataCreatorForTests.createSpecificTreeState());
        universe.addTree(tree);
        universe3D.initFromUniverse(universe);

        assertNotNull(universe3D.getLights());

        Set<Node> elements3d = universe3D.getElements3D();
View Full Code Here

        assertTrue(root.getCapability(Group.ALLOW_CHILDREN_EXTEND));
    }

    public void testInitFromUniverse() {
        BasicUniverse3D universe3D = new BasicUniverse3D();
        Universe universe = new MockUniverse();
        MockTreeLeaf treeLeaf = new MockTreeLeaf();
        treeLeaf.setState(CoreDataCreatorForTests.createSpecificTreeLeafState());
        universe.addFallenLeaf(treeLeaf);
        MockTree tree = new MockTree();
        tree.setState(CoreDataCreatorForTests.createSpecificTreeState());
        universe.addTree(tree);
        universe3D.initFromUniverse(universe);

        assertNotNull(universe3D.getLights());

        Set<Node> elements3d = universe3D.getElements3D();
View Full Code Here

    private MockUniverse mockUniverse;

    protected void setUp() throws Exception {
        super.setUp();
        mockUniverse = new MockUniverse();
        controller = new UniverseTimeController(mockUniverse);
        controller.setSpeed(10);
    }
View Full Code Here

TOP

Related Classes of barsuift.simLife.universe.MockUniverse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.