public abstract class AbstractRawStoreTestCase extends TestCase3
IRawStore
interface.TestCase2.MyProperties, TestCase2.RandomType
Modifier and Type | Field and Description |
---|---|
protected Random |
r
A random number generated - the seed is NOT fixed.
|
_randomType, log
Constructor and Description |
---|
AbstractRawStoreTestCase() |
AbstractRawStoreTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getRandomData()
Returns random data that will fit in N bytes.
|
protected abstract IRawStore |
getStore()
Return a new store that will serve as the fixture for the test.
|
void |
test_close() |
void |
test_multipleWrites()
Test writes a bunch of records and verifies that each can be read after
it is written.
|
void |
test_read_correctRejection_0L()
A read with a 0L address is always an error.
|
void |
test_read_correctRejection_zeroLength()
A delete with an address encoding a zero length component is an error
(the address is ill-formed since we do not allow writes of zero length
records).
|
void |
test_readImmutable()
Test verifies that read does not permit changes to the store state by
modifying the returned buffer.
|
void |
test_write_correctRejection_emptyRecord()
Test verifies correct rejection of a write operation when the caller
supplies an empty buffer (no bytes remaining).
|
void |
test_write_correctRejection_null()
Test verifies correct rejection of a write operation when the caller
supplies a [null] buffer.
|
void |
test_writeImmutable()
Test verifies that write does not permit changes to the store state by
modifying the supplied buffer after the write operation (i.e., a copy
is made of the data in the buffer).
|
void |
test_writeRead()
Test verifies that we can write and then read back a record.
|
void |
test_writeReadRead()
Test verifies that we can write and then read back a record twice.
|
void |
testBlobObjectStreams()
Writing a blob sized object stream is an excellent test since the ObjectInputStream
will likely throw an exception if there is a data error.
|
void |
testEmptyStream() |
void |
testSimpleStringStream() |
void |
testSimpleStringStreamFromStandardAllocation() |
void |
testZipStreams()
This test exercises the stream interface and serves as an example of
stream usage for compressed IO.
|
assertCondition, assertCondition, assertEquals, assertEquals, getBytes, getPort, getRandomData, getRandomData, setUp, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getProperties, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
protected final Random r
public AbstractRawStoreTestCase()
public AbstractRawStoreTestCase(String name)
name
- protected abstract IRawStore getStore()
public void test_write_correctRejection_emptyRecord()
public void test_write_correctRejection_null()
public void test_read_correctRejection_0L()
public void test_read_correctRejection_zeroLength()
public void test_writeRead()
public void test_writeReadRead()
public void test_writeImmutable()
public void test_readImmutable()
public void test_multipleWrites()
public void testSimpleStringStream() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void testSimpleStringStreamFromStandardAllocation() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void testEmptyStream() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void testBlobObjectStreams() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void testZipStreams() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void test_close()
public ByteBuffer getRandomData()
ByteBuffer
wrapping a new byte[]
of
random length and having random contents.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.