Keel 2.1RC2

org.apache.commons.collections
Class TestBoundedFifoBuffer2

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.collections.BulkTest
              extended byorg.apache.commons.collections.TestObject
                  extended byorg.apache.commons.collections.TestCollection
                      extended byorg.apache.commons.collections.TestBoundedFifoBuffer
                          extended byorg.apache.commons.collections.TestBoundedFifoBuffer2
All Implemented Interfaces:
java.lang.Cloneable, junit.framework.Test

public class TestBoundedFifoBuffer2
extends TestBoundedFifoBuffer

Runs tests against a full BoundedFifoBuffer, since many of the algorithms differ depending on whether the fifo is full or not.


Field Summary
 
Fields inherited from class org.apache.commons.collections.TestCollection
collection, confirmed
 
Fields inherited from class org.apache.commons.collections.TestObject
COLLECTIONS_MAJOR_VERSION
 
Fields inherited from class org.apache.commons.collections.BulkTest
verboseName
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestBoundedFifoBuffer2(java.lang.String n)
           
 
Method Summary
 boolean isAddSupported()
          Overridden to skip the add tests.
 java.util.Collection makeFullCollection()
          Returns a BoundedFifoBuffer that's filled to capacity.
static junit.framework.Test suite()
           
 void testBufferOverflow()
          Tests to make sure the add operations raise BufferOverflowException.
 void testUnsupportedAdd()
          Overridden because the add operations raise BufferOverflowException instead of UnsupportedOperationException.
 
Methods inherited from class org.apache.commons.collections.TestBoundedFifoBuffer
getFullElements, makeCollection, makeConfirmedCollection, makeConfirmedFullCollection, testBoundedFifoBufferRemove, testCollectionIteratorFailFast, testConstructorException1, testConstructorException2, verify
 
Methods inherited from class org.apache.commons.collections.TestCollection
areEqualElementsDistinguishable, getFullNonNullElements, getFullNonNullStringElements, getOtherElements, getOtherNonNullElements, getOtherNonNullStringElements, isRemoveSupported, makeObject, resetEmpty, resetFull, testCollectionAdd, testCollectionAddAll, testCollectionClear, testCollectionContains, testCollectionContainsAll, testCollectionIsEmpty, testCollectionIterator, testCollectionIteratorRemove, testCollectionRemove, testCollectionRemoveAll, testCollectionRetainAll, testCollectionSize, testCollectionToArray, testCollectionToArray2, testCollectionToString, testUnsupportedRemove
 
Methods inherited from class org.apache.commons.collections.TestObject
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, getCompatibilityVersion, readExternalFormFromBytes, readExternalFormFromDisk, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
 
Methods inherited from class org.apache.commons.collections.BulkTest
clone, ignoredSimpleTests, makeSuite, toString
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestBoundedFifoBuffer2

public TestBoundedFifoBuffer2(java.lang.String n)
Method Detail

suite

public static junit.framework.Test suite()

makeFullCollection

public java.util.Collection makeFullCollection()
Returns a BoundedFifoBuffer that's filled to capacity. Any attempt to add to the returned buffer will result in a BufferOverflowException.

Overrides:
makeFullCollection in class TestCollection
Returns:
a full BoundedFifoBuffer

isAddSupported

public boolean isAddSupported()
Overridden to skip the add tests. All of them would fail with a BufferOverflowException.

Overrides:
isAddSupported in class TestCollection
Returns:
false

testUnsupportedAdd

public void testUnsupportedAdd()
Overridden because the add operations raise BufferOverflowException instead of UnsupportedOperationException.

Overrides:
testUnsupportedAdd in class TestCollection

testBufferOverflow

public void testBufferOverflow()
Tests to make sure the add operations raise BufferOverflowException.


Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.