|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.util.AssertionUtil
public class AssertionUtil
Utility methods for common assertions.
| Constructor Summary | |
|---|---|
AssertionUtil()
|
|
| Method Summary | |
|---|---|
static void |
assertBytesDifferent(byte[] b1,
byte[] b2)
Assert that two byte arrays are of same size and have same contents. |
static void |
assertBytesSame(byte[] b1,
byte[] b2)
Assert that two byte arrays are of same size and have same contents. |
static void |
assertNoDuplicateObjects(java.lang.Object[] arg)
Looks for any duplicates and throws an exception if found. |
static void |
assertNoNullValues(byte[] bytes)
|
static void |
assertNoNullValues(byte[][] bytes)
|
static void |
assertNoNullValues(java.lang.Object o)
Throws exception if any null values found. |
static void |
assertNoNullValues(java.lang.Object[] arg)
Throws exception if any null values found. |
static void |
assertNoNullValues(java.lang.Object[][] arg)
Throws exception if any null values found. |
static void |
assertSame(java.io.File file1,
java.io.File file2)
Assert that two files or directories are the same, which means: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssertionUtil()
| Method Detail |
|---|
public static void assertNoNullValues(java.lang.Object o)
throws java.lang.Exception
Throws exception if any null values found.
o -
java.lang.Exception
public static void assertNoNullValues(java.lang.Object[] arg)
throws java.lang.Exception
Throws exception if any null values found.
arg -
java.lang.Exception
public static void assertNoNullValues(byte[] bytes)
throws java.lang.Exception
bytes -
java.lang.Exception
public static void assertNoNullValues(byte[][] bytes)
throws java.lang.Exception
bytes -
java.lang.Exception
public static void assertNoNullValues(java.lang.Object[][] arg)
throws java.lang.Exception
Throws exception if any null values found.
arg -
java.lang.Exception
public static void assertNoDuplicateObjects(java.lang.Object[] arg)
throws java.lang.Exception
Looks for any duplicates and throws an exception if found.
arg -
java.lang.Exception
public static void assertBytesSame(byte[] b1,
byte[] b2)
throws java.lang.Exception
Assert that two byte arrays are of same size and have same contents.
b1 - b2 -
java.lang.Exception
public static void assertBytesDifferent(byte[] b1,
byte[] b2)
throws java.lang.Exception
Assert that two byte arrays are of same size and have same contents.
b1 - b2 -
java.lang.Exception
public static void assertSame(java.io.File file1,
java.io.File file2)
throws java.io.IOException,
java.lang.Exception
Assert that two files or directories are the same, which means:
Note this does NOT assert that the files or directories have the same nextName. This allows the use of TempFileUtil, which must flexibly nextName temporary files and directories.
However, if passing two directories, all contents (subdirectories and files) must have the same nextName.
file1 - file2 -
java.io.IOException
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||