|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.junit.TestRng
public class TestRng
Toy RNG to ensure we get predictable numbers during unit tests.
Constructor Summary | |
---|---|
TestRng(java.lang.String seed)
Create a new random number generator, seeded by a string. |
Method Summary | |
---|---|
byte[] |
nextBytes(int cnt)
Get the next cnt bytes of random data. |
int |
nextInt()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestRng(java.lang.String seed)
seed
- seed to bootstrap, usually this is the test method name.Method Detail |
---|
public byte[] nextBytes(int cnt)
cnt
bytes of random data.
cnt
- number of random bytes to produce.
cnt
randomly generated bytes.public int nextInt()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |