listFW.test
Class Test_NewList

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by listFW.test.Test_NewList
All Implemented Interfaces:
junit.framework.Test

public class Test_NewList
extends junit.framework.TestCase

A JUnit test case class.


Nested Class Summary
(package private)  class Test_NewList.TestClass
          Custom class used by the test_ToStringAlgo test
 
Constructor Summary
Test_NewList()
           
 
Method Summary
 void test_CopyList()
          Test copying the list using a copy visitor that takes the factory as its input parameter.
 void test_CopyList2()
          Test copying the list using a copy visitor that takes the factory in its constructor and thus does not use its parameter.
 void test_CopyList3()
          Test copying the list using a copy visitor that takes the factory as a parameter
 void test_factory()
          Test the parameterized list factory
 void test_MakePhrase()
          Test a more complex visitor that uses an input parameter that is not itself parameterized.
 void test_ReverseList()
           
 void test_ReverseList2()
           
 void test_ReverseList3()
           
 void test_SumIntList_Fwd()
          Test a forward accumulation algorithm which is an algorithm that takes an unparameterized input value.
 void test_SumIntList()
          Test the summing of a list of integers
 void test_SumIntValList()
          Test the summing of the integer part of a list of numbers.
 void test_SumNumList()
          Test the summing of a list of numbers, which should work on a list of integers or a list of doubles.
 void test_toString()
          Test the internal toString() method of a list
 void test_ToStringAlgo()
          Tests the universality of the ToStringAlgo visitor.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Test_NewList

public Test_NewList()
Method Detail

test_toString

public void test_toString()
Test the internal toString() method of a list


test_ToStringAlgo

public void test_ToStringAlgo()
Tests the universality of the ToStringAlgo visitor.


test_MakePhrase

public void test_MakePhrase()
Test a more complex visitor that uses an input parameter that is not itself parameterized.


test_factory

public void test_factory()
Test the parameterized list factory


test_SumIntList

public void test_SumIntList()
Test the summing of a list of integers


test_SumNumList

public void test_SumNumList()
Test the summing of a list of numbers, which should work on a list of integers or a list of doubles.


test_SumIntValList

public void test_SumIntValList()
Test the summing of the integer part of a list of numbers. This is just to show that an Integer can be returned when a Number is specified.


test_SumIntList_Fwd

public void test_SumIntList_Fwd()
Test a forward accumulation algorithm which is an algorithm that takes an unparameterized input value.


test_CopyList

public void test_CopyList()
Test copying the list using a copy visitor that takes the factory as its input parameter. Notice how the visitor (algo) is specfied as taking an IListFactory which is not typed to be specifically the same as the list's type.


test_CopyList2

public void test_CopyList2()
Test copying the list using a copy visitor that takes the factory in its constructor and thus does not use its parameter.


test_CopyList3

public void test_CopyList3()
Test copying the list using a copy visitor that takes the factory as a parameter


test_ReverseList

public void test_ReverseList()

test_ReverseList2

public void test_ReverseList2()

test_ReverseList3

public void test_ReverseList3()