|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hw2.test.BallContainerTest
public class BallContainerTest
BallContainerTest is a glassbox test of the BallContainer class. Recall that the BallContainer is a container for Balls. However, you can only put a Ball into a BallContainer once. After you put the Ball into the BallContainer, further attempts to do so will fail, since the Ball is already in the BallContainer! Similarly, you cannot expect to remove a Ball from a BallContainer if it is not inside the BallContainer.
Ball
,
BallContainer
Constructor Summary | |
---|---|
BallContainerTest()
|
Method Summary | |
---|---|
static void |
setupForTests()
|
void |
testAdd()
Test to check that BallContainer.add(Ball) is implemented correctly |
void |
testClear()
Test that BallContainer.clear() is implemented correctly. |
void |
testContains()
Test that size() returns the correct number. |
void |
testIterator()
Test to check that BallContainer.iterator() is implemented correctly. |
void |
testRemove()
Test to check that BallContainer.remove(Ball) is implemented correctly |
void |
testSize()
Test that size() returns the correct number. |
void |
testVolume()
Test that we can put a Ball into a BallContainer |
void |
testVolumeAfterClear()
Test that clear removes all balls. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BallContainerTest()
Method Detail |
---|
public static void setupForTests() throws Exception
Exception
public void testAdd()
public void testRemove()
public void testIterator()
public void testClear()
public void testVolume()
public void testSize()
public void testContains()
public void testVolumeAfterClear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |