j3d.org Code

org.j3d.geom
Class TestSpringGenerator

java.lang.Object
  extended byTestCase
      extended byorg.j3d.geom.TestSpringGenerator

public class TestSpringGenerator
extends TestCase

A test case to check the functionality of the SpringGenerator implementation.

The test aims to check the basic calculation routines to make sure there are no array overruns and the geometry is updated correctly. It does not do a check on the coordinates generated. That is a visual test and is performed by the example code.

Version:
$Revision: 1.2 $
Author:
Justin Couch
See Also:
Serialized Form

Constructor Summary
TestSpringGenerator(java.lang.String name)
          Create an instance of the test case for this particular test name.
 
Method Summary
static void main(java.lang.String[] argv)
          Main method to kick everything off with.
static Test suite()
          Fetch the suite of tests for this test class to perform.
 void testCoordinateArray()
          Test that the size of the array generated for coordinates is correct.
 void testCreate()
          Test that we can create the Spring generator with different constructors and have it give us the right information for vertex counts.
 void testInvalidFacets()
          Test to see how the facet handling works.
 void testNormalArray()
          Test that the size of the array generated for coordinates is correct.
 void testValidFacets()
          Test to makes sure the vertex count has been updated properly and the generated array lengths are correct.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSpringGenerator

public TestSpringGenerator(java.lang.String name)
Create an instance of the test case for this particular test name.

Parameters:
name - The name of the test method to be run
Method Detail

suite

public static Test suite()
Fetch the suite of tests for this test class to perform.

Returns:
A collection of all the tests to be run

testCreate

public void testCreate()
Test that we can create the Spring generator with different constructors and have it give us the right information for vertex counts.


testCoordinateArray

public void testCoordinateArray()
Test that the size of the array generated for coordinates is correct. This also makes sure that the calculation routines do not generate errors either


testNormalArray

public void testNormalArray()
Test that the size of the array generated for coordinates is correct. This also makes sure that the calculation routines do not generate errors either


testInvalidFacets

public void testInvalidFacets()
Test to see how the facet handling works. Makes sure that the correct exceptions are generated when setting or changing the facet count.


testValidFacets

public void testValidFacets()
Test to makes sure the vertex count has been updated properly and the generated array lengths are correct.


main

public static void main(java.lang.String[] argv)
Main method to kick everything off with.


j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org