org.infinitest.toolkit
Class UnmodifiableCollectionTestSupport<T>

java.lang.Object
  extended by org.infinitest.toolkit.UnmodifiableCollectionTestSupport<T>
Type Parameters:
T - the type of the items in the collections involved
Direct Known Subclasses:
UnmodifiableListTestSupport

public abstract class UnmodifiableCollectionTestSupport<T>
extends Object

Support structure for testing the unmodifiability of a collection. This is useful for verifying that accessor methods that return collections do not allow direct adding or removing from the underlying collection field.

Author:
Paul Holser

Constructor Summary
UnmodifiableCollectionTestSupport()
           
 
Method Summary
 void initializeHarness()
           
 void shouldPreventAdd()
           
 void shouldPreventAddAll()
           
 void shouldPreventClear()
           
 void shouldPreventRemove()
           
 void shouldPreventRemoveAll()
           
 void shouldPreventRemoveViaIterator()
           
 void shouldPreventRetainAll()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnmodifiableCollectionTestSupport

public UnmodifiableCollectionTestSupport()
Method Detail

initializeHarness

public final void initializeHarness()

shouldPreventAdd

public final void shouldPreventAdd()

shouldPreventAddAll

public final void shouldPreventAddAll()

shouldPreventClear

public final void shouldPreventClear()

shouldPreventRemove

public final void shouldPreventRemove()

shouldPreventRemoveAll

public final void shouldPreventRemoveAll()

shouldPreventRetainAll

public final void shouldPreventRetainAll()

shouldPreventRemoveViaIterator

public final void shouldPreventRemoveViaIterator()


© Copyright 2009 Paul R. Holser, Jr. All rights reserved. pholser@alumni.rice.edu