com.seisw.util.geom
Class PolyDefaultTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.seisw.util.geom.PolyDefaultTest
All Implemented Interfaces:
junit.framework.Test

public class PolyDefaultTest
extends junit.framework.TestCase

PolyDefaultTest is a set of unit tests using JUnit for the class PolyDefalt.

Author:
Dan Bridenbecker, Solution Engineering, Inc.

Constructor Summary
PolyDefaultTest(java.lang.String name)
           
 
Method Summary
static void main(java.lang.String[] args)
          Provides the ability to run the tests contained here in.
protected  void setUp()
          Construct and initialize any objects that will be used in multiple tests.
static junit.framework.TestSuite suite()
          Return the suite of tests
protected  void tearDown()
           
 void testAreaNonConvex()
          Test the getting the area of a non-convex polygon
 void testAreaSquare()
          Test the getting the area of a square
 void testAreaTriangle()
          Test the getting the area of a triangle
 void testAreaWithHole()
          Test the getting the area of a polygon with a hole
 void testEqualsBadOrder()
          Test the equality operator when same points but not it same order
 void testEqualsDifferentNumPoints()
          Test the equality operator when polys with different number of points
 void testEqualsDifferentOrder()
          Test the equality operator when same but different order
 void testEqualsDifferentValue()
          Test the equality operator when smae number of points but one point value different
 void testEqualsEmpty()
          Test the equality operator when empty
 void testEqualsSame()
          Test the equality operator when same
 void testSelfIntersecting()
          Test the getting the area of a self-intersecting polygon
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, 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

PolyDefaultTest

public PolyDefaultTest(java.lang.String name)
Parameters:
name - Name of test case
Method Detail

main

public static void main(java.lang.String[] args)
Provides the ability to run the tests contained here in.

Parameters:
args - Command line arguements.

suite

public static junit.framework.TestSuite suite()
Return the suite of tests


setUp

protected void setUp()
Construct and initialize any objects that will be used in multiple tests. tests. Currently Empty.


tearDown

protected void tearDown()

testEqualsEmpty

public void testEqualsEmpty()
Test the equality operator when empty


testEqualsSame

public void testEqualsSame()
Test the equality operator when same


testEqualsDifferentOrder

public void testEqualsDifferentOrder()
Test the equality operator when same but different order


testEqualsBadOrder

public void testEqualsBadOrder()
Test the equality operator when same points but not it same order


testEqualsDifferentNumPoints

public void testEqualsDifferentNumPoints()
Test the equality operator when polys with different number of points


testEqualsDifferentValue

public void testEqualsDifferentValue()
Test the equality operator when smae number of points but one point value different


testAreaTriangle

public void testAreaTriangle()
Test the getting the area of a triangle


testAreaSquare

public void testAreaSquare()
Test the getting the area of a square


testAreaNonConvex

public void testAreaNonConvex()
Test the getting the area of a non-convex polygon


testAreaWithHole

public void testAreaWithHole()
Test the getting the area of a polygon with a hole


testSelfIntersecting

public void testSelfIntersecting()
Test the getting the area of a self-intersecting polygon



Copyright © 2004 Solution Engineering, Inc. All Rights Reserved.