Examples of TestUElement


Examples of etherstrategy.simulation.TestUElement

        LinkedList<Object> testCollection =
            new LinkedList<Object>();
        LinkedList<Object> emptyCollection =
            new LinkedList<Object>();

        TestUElement element1 = new TestUElement();
        TestUElement element2 = new TestUElement();

        /* By now we've established that adding elements to a primitive
         * UniverseElement has no effect. . .  We'll leave that part out and just
         * do the parts that might possibly have some effect.
         */
 
View Full Code Here

Examples of etherstrategy.simulation.TestUElement

        LinkedList<Object> testCollection =
            new LinkedList<Object>();
        LinkedList<Object> emptyCollection =
            new LinkedList<Object>();

        TestUElement element1 = new TestUElement();
        TestUElement element2 = new TestUElement();

        testCollection.add(element1);
        testCollection.add(element2);
       
        assertFalse(
View Full Code Here

Examples of etherstrategy.simulation.TestUElement

        assertEquals(
                "A UniverseElement with its center at (5.5, 7.5, 5.5) that has been moved by (-1, -3, .5) using another vector should, after the move, have its center at (4.5, 4.5, 6)",
                testElement.getCenter(), new Vector3f(4.5f, 4.5f, 6) );

        TestUElement comparisonElement = new TestUElement();
        comparisonElement.setCenter( 1, 1, 1 );

        assertFalse(
                "Two UniverseElements that have different centers but are otherwise similar should not be similar.",
                testElement.similar( comparisonElement ) );

        comparisonElement.setCenter( testElement.getCenter() );
        assertTrue(
                "Two UniverseElements that have everything the same, including their centers, should be similar.",
                testElement.similar( comparisonElement ) );
    }
View Full Code Here

Examples of etherstrategy.simulation.TestUElement

        /* By now we know that adding elements to a UniverseElement has no effect,
         * so we're skipping that part.
         */

        UniverseElement[] UEArray =
            { new TestUElement(), new TestUElement(), new TestUElement(),
              new TestUElement(), new TestUElement(), new TestUElement(),
              new TestUElement(), new TestUElement(),
            };
        UniverseElement[] clonedUEArray = UEArray.clone();

        UniverseElement[] returnedUEArray;

View Full Code Here

Examples of etherstrategy.simulation.TestUElement

    @Test
    public void copyingUniverseElements() throws Exception
    {
        testElement.setCenter1, 2, 3 );

        TestUElement copiedElement = new TestUElement(testElement);

        assertNotNull(
                "After creating a new UnvierseElement through a copy constructor, the new UniverseElement should not be null.",
                copiedElement );

        assertTrue(
                "After creating a new UnvierseElement through a copy constructor, the copy should be similar to the original.",
                testElement.similar( copiedElement ) );

        assertEquals(
                "After creating a new UniverseElement through a copy constructor, the centers of the two element should be equal.",
                testElement.getCenter(), copiedElement.getCenter() );

        testElement.setCenter( 1, 1, 1 );

        assertFalse(
                "After creating a new UniverseElement through a copy constructor and then changing the center of the original UniverseElement, the centers of the two elements should not be equal.",
                testElement.getCenter() == copiedElement.getCenter() );
    }
View Full Code Here

Examples of etherstrategy.simulation.TestUElement

    @Test
    public void checkingForUniverseElementLeafState() throws Exception
    {
        assertTrue(
                "UniverseElements that do not override isLeaf() should always return true when that method is called.",
                (new TestUElement()).isLeaf()
                && (new TestA()).isLeaf()
                && (new TestB()).isLeaf()
                && (new TestC()).isLeaf()
                && (new TestDerivedFromC()).isLeaf() );
    }
View Full Code Here

Examples of etherstrategy.simulation.TestUElement

     */
    @Test
    public void addTestElementsToUniverse() throws Exception
    {
        Universe testUniverse2 = new Universe();
        TestUElement testElement = new TestUElement();

        testUniverse.add( testElement );

        assertFalse(
                "A Universe that has had an element added should not be equal to a Universe that has no nodes.",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.