public class Assert
extends junit.framework.Assert
Modifier | Constructor and Description |
---|---|
protected |
Assert()
static class only
|
Modifier and Type | Method and Description |
---|---|
static void |
assertEquals(File expected,
File actual,
boolean isBinary)
Compares two files.
|
static void |
assertEquals(InputStream expected,
InputStream actual,
boolean isBinary,
String filename)
Compares two streams.
|
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
public static void assertEquals(File expected, File actual, boolean isBinary) throws FileNotFoundException, IOException
expected
- reference fileactual
- file to be testedisBinary
- when true will do byte-by-byte comparison rather than line by line.FileNotFoundException
- if one of the files cannot be found.IOException
- if one of the files cannot read.junit.framework.AssertionFailedError
- if the files are not equal.public static void assertEquals(InputStream expected, InputStream actual, boolean isBinary, String filename) throws IOException
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).IOException
- if one of the streams cannot read.junit.framework.AssertionFailedError
- if the streams are not equal.Copyright © 2014. All rights reserved.