j3d.org Code

org.j3d.geom
Class TestCylinderGenerator

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.j3d.geom.TestCylinderGenerator
All Implemented Interfaces:
junit.framework.Test

public class TestCylinderGenerator
extends junit.framework.TestCase

A test case to check the functionality of the CylinderGenerator 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.3 $
Author:
Justin Couch

Constructor Summary
TestCylinderGenerator(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 junit.framework.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 Cylinder 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 junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestCylinderGenerator

public TestCylinderGenerator(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 junit.framework.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 Cylinder 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