org.apache.derbyTesting.functionTests.tests.derbynet
Class ByteArrayCombinerStreamTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.derbyTesting.junit.BaseTestCase
org.apache.derbyTesting.functionTests.tests.derbynet.ByteArrayCombinerStreamTest
- All Implemented Interfaces:
- junit.framework.Test
public class ByteArrayCombinerStreamTest
- extends BaseTestCase
Test functionality of ByteArrayCombinerStream.
|
Field Summary |
private org.apache.derby.client.am.ByteArrayCombinerStream |
combiner
|
private static byte[] |
defaultArray
|
| Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase |
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
defaultArray
private static final byte[] defaultArray
combiner
private org.apache.derby.client.am.ByteArrayCombinerStream combiner
ByteArrayCombinerStreamTest
public ByteArrayCombinerStreamTest(java.lang.String name)
testCombineNullRead
public void testCombineNullRead()
throws java.io.IOException
- Throws:
java.io.IOException
testCombineNullReadArray
public void testCombineNullReadArray()
throws java.io.IOException
- Throws:
java.io.IOException
testCombineAvailableNull
public void testCombineAvailableNull()
throws java.io.IOException
- Throws:
java.io.IOException
testCombineAvailable4bytes
public void testCombineAvailable4bytes()
throws java.io.IOException
- Throws:
java.io.IOException
testCombineWithExtraEmptyByteArray
public void testCombineWithExtraEmptyByteArray()
throws java.io.IOException
- Make sure an extra "empty" array doesn't cause errors.
This test is based on knowledge of the implementation, where an extra
byte array was not removed during the reducation process. This can
cause
nextArray to not return null when it
should, causing an ArrayIndexOutOfBoundsException.
This bug was corrected by DERBY-1417.
- Throws:
java.io.IOException
testCombineOneArray
public void testCombineOneArray()
throws java.io.IOException
- Throws:
java.io.IOException
testCominbe100SmallArrays
public void testCominbe100SmallArrays()
throws java.io.IOException
- Throws:
java.io.IOException
testTruncateDataFromOneArray
public void testTruncateDataFromOneArray()
throws java.io.IOException
- Throws:
java.io.IOException
testTruncateDataFromTwoArrays
public void testTruncateDataFromTwoArrays()
throws java.io.IOException
- Throws:
java.io.IOException
testTooLittleDataNoCombine
public void testTooLittleDataNoCombine()
- Make sure an exception is thrown if there is less data available than
the specified length.
testTooLittleDataWithCombine
public void testTooLittleDataWithCombine()
- Make sure an exception is thrown if there is less data available than
the specified length.
testNegativeLengthArgument
public void testNegativeLengthArgument()
- Make sure an exception is thrown if a negative length is specified.
testNegativeValueInDataCausesEndOfStream
public void testNegativeValueInDataCausesEndOfStream()
throws java.io.IOException
- Demonstrate that the stream does not change negative values in the
underlying data.
This can cause code to believe the stream is exhausted even though it is
not.
- Throws:
java.io.IOException
suite
public static junit.framework.Test suite()
Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.