org.freehep.util
Class Assert
- java.lang.Object
-
- junit.framework.Assert
-
- org.freehep.util.Assert
-
public class Assert extends junit.framework.AssertAdditional assert methods to the junit.framework.Assert class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidassertEquals(java.io.File expected, java.io.File actual, boolean isBinary)Compares two files.static voidassertEquals(java.io.InputStream expected, java.io.InputStream actual, boolean isBinary, java.lang.String filename)Compares two streams.-
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, failNotEquals, failNotSame, failSame, format
-
-
-
-
Method Detail
-
assertEquals
public static void assertEquals(java.io.File expected, java.io.File actual, boolean isBinary) throws java.io.FileNotFoundException, java.io.IOExceptionCompares two files. The files may be gzipped, and will then be uncompressed on the fly.- Parameters:
expected- reference fileactual- file to be testedisBinary- when true will do byte-by-byte comparison rather than line by line.- Throws:
java.io.FileNotFoundException- if one of the files cannot be found.java.io.IOException- if one of the files cannot read.junit.framework.AssertionFailedError- if the files are not equal.
-
assertEquals
public static void assertEquals(java.io.InputStream expected, java.io.InputStream actual, boolean isBinary, java.lang.String filename) throws java.io.IOExceptionCompares two streams.- Parameters:
expected- reference streamactual- stream to be testedfilename- an prefix for the error message (normally filename associated with the actual stream)isBinary- when true will do byte-by-byte comparison rather than line by line (Reader).- Throws:
java.io.IOException- if one of the streams cannot read.junit.framework.AssertionFailedError- if the streams are not equal.
-
-
DMelt 3.0 © DataMelt by jWork.ORG