public class TestCase3 extends TestCase2
TestCase2.MyProperties, TestCase2.RandomType
Modifier and Type | Field and Description |
---|---|
protected Random |
r
A random number generated - the seed is NOT fixed.
|
_randomType, log
Modifier and Type | Method and Description |
---|---|
static void |
assertCondition(Runnable cond)
Waits up to 5 seconds for the condition to succeed.
|
static void |
assertCondition(Runnable cond,
long timeout,
TimeUnit units)
Wait up to a timeout until some condition succeeds.
|
static void |
assertEquals(byte[] expected,
ByteBuffer actual)
Helper method verifies that the contents of actual from
position() to limit() are consistent with the expected byte[].
|
static void |
assertEquals(ByteBuffer expectedBuffer,
ByteBuffer actual)
Helper method verifies that the contents of actual from
position() to limit() are consistent with the expected byte[].
|
static byte[] |
getBytes(ByteBuffer buf)
Return the data in the buffer.
|
protected static int |
getPort(int suggestedPort)
Return an open port on current machine.
|
protected ByteBuffer |
getRandomData(ByteBuffer b,
int nbytes)
Returns random data that will fit in nbytes.
|
protected ByteBuffer |
getRandomData(int nbytes)
Returns random data that will fit in nbytes.
|
protected void |
setUp() |
protected void |
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 Random r
public TestCase3()
public TestCase3(String name)
name
- protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
public static void assertEquals(ByteBuffer expectedBuffer, ByteBuffer actual)
expected
- Non-null byte[].actual
- Buffer.public static void assertEquals(byte[] expected, ByteBuffer actual)
expected
- Non-null byte[].actual
- Buffer.public static byte[] getBytes(ByteBuffer buf)
public static void assertCondition(Runnable cond, long timeout, TimeUnit units)
cond
- The condition, which must throw an
AssertionFailedError
if it does not succeed.timeout
- The timeout.unit
- junit.framework.AssertionFailedError
- if the condition does not succeed within the timeout.public static void assertCondition(Runnable cond)
cond
- The condition, which must throw an
AssertionFailedError
if it does not succeed.junit.framework.AssertionFailedError
- if the condition does not succeed within the timeout.assertCondition(Runnable, long, TimeUnit)
protected ByteBuffer getRandomData(int nbytes)
ByteBuffer
wrapping a new byte[]
having random contents.protected ByteBuffer getRandomData(ByteBuffer b, int nbytes)
ByteBuffer
wrapping a new byte[]
having random contents.protected static int getPort(int suggestedPort) throws IOException
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.