edu.rice.cs.plt.collect
Class WeakHashSetTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.rice.cs.plt.collect.WeakHashSetTest
All Implemented Interfaces:
Test

public class WeakHashSetTest
extends TestCase

A JUnit test case class for WeakHashSet. Every method starting with the word "test" will be called when running the test with JUnit.


Constructor Summary
WeakHashSetTest()
           
 
Method Summary
 void setUp()
          Initalizes the test environment
 void testAddAndContains()
          Tests that the add and contains methods work.
 void testAutomaticRemoval()
          Tests that objects with no strong references are automatically removed from the set by a garbage collection.
 void testClear()
          Tests that the clear() method works.
 void testIterator()
          Tests that the set's Iterator returns all the elements from the set and no more.
 void testRemove()
          Tests that the remove method works.
 void testSize()
          Tests that the size method works.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

WeakHashSetTest

public WeakHashSetTest()
Method Detail

setUp

public void setUp()
Initalizes the test environment

Overrides:
setUp in class TestCase

testAddAndContains

public void testAddAndContains()
Tests that the add and contains methods work.


testSize

public void testSize()
Tests that the size method works.


testClear

public void testClear()
Tests that the clear() method works.


testRemove

public void testRemove()
Tests that the remove method works.


testIterator

public void testIterator()
Tests that the set's Iterator returns all the elements from the set and no more.


testAutomaticRemoval

public void testAutomaticRemoval()
Tests that objects with no strong references are automatically removed from the set by a garbage collection.