|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.junit.FileTester
public class FileTester
The Class FileTester.
| Method Summary | |
|---|---|
static void |
assertContentEquals(File file1,
File file2)
Asserts that the content of two files are equal. |
static void |
assertContentEquals(File file1,
File file2,
Charset encoding)
Asserts that the content of two files are equal. |
static void |
assertContentEquals(File file1,
File file2,
Charset encoding,
Pattern... ignores)
Asserts that the content of two files are equal. |
static void |
assertContentEquals(File file1,
File file2,
int from,
int to)
Asserts that the content of two files are equal. |
static void |
assertContentEquals(File file1,
File file2,
int from,
int to,
Charset encoding)
Asserts that the content of two files are equal. |
static void |
assertContentEquals(File file1,
File file2,
int from,
int to,
String encoding)
Asserts that the content of two files are equal. |
static void |
assertContentEquals(File file1,
File file2,
Pattern... ignores)
Asserts that the content of two files are equal. |
static void |
assertContentEquals(File file1,
File file2,
String encoding)
Asserts that the content of two files are equal. |
static void |
assertEquals(File file1,
File file2)
Two files are considered equals if the would point to the same file location on the disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void assertContentEquals(File file1,
File file2)
throws AssertionError
file1 - the first filefile2 - the second file
AssertionError - if the check fails
public static void assertContentEquals(File file1,
File file2,
int from,
int to)
throws AssertionError
file1 - the first filefile2 - the second filefrom - the line number from which the comparison is started
(starting with 1)to - the last line number where the comparison ends.
AssertionError - if the check fails
public static void assertContentEquals(File file1,
File file2,
String encoding)
throws AssertionError
The encoding is only important for the output if the two files are not equals.
file1 - the first filefile2 - the second fileencoding - the encoding
AssertionError - if the check fails
public static void assertContentEquals(File file1,
File file2,
int from,
int to,
String encoding)
throws AssertionError
The encoding is only important for the output if the two files are not equals.
file1 - the first filefile2 - the second filefrom - the line number from which the comparison is started
(starting with 1)to - the last line number where the comparison ends.encoding - the encoding
AssertionError - if the check fails
public static void assertContentEquals(File file1,
File file2,
Charset encoding)
throws AssertionError
The encoding is only important for the output if the two files are not equals.
file1 - the first filefile2 - the second fileencoding - the encoding
AssertionError - if the check fails
public static void assertContentEquals(File file1,
File file2,
int from,
int to,
Charset encoding)
throws AssertionError
The encoding is only important for the output if the two files are not equals.
file1 - the first filefile2 - the second filefrom - the line number from which the comparison is started
(starting with 1)to - the last line number where the comparison ends.encoding - the encoding
AssertionError - if the check fails
public static void assertContentEquals(File file1,
File file2,
Pattern... ignores)
throws AssertionError
Pattern.compile("#.*"), Pattern.compile("[ \\t]*"
as ignores parameters.
If the two files are not equals the first different line or byte will be shown.
file1 - the first filefile2 - the second fileignores - the line pattern which should be ignored
AssertionError - if the check failsassertContentEquals(File, File, Charset, Pattern...)
public static void assertContentEquals(File file1,
File file2,
Charset encoding,
Pattern... ignores)
throws AssertionError
Pattern.compile("#.*"), Pattern.compile("[ \\t]*"
as ignores parameters.
If the two files are not equals the first different line or byte will be shown.
file1 - the first filefile2 - the second fileencoding - the file encodingignores - the line pattern which should be ignored
AssertionError - if the check fails
public static void assertEquals(File file1,
File file2)
file1 - e.g. file "/a/b/c"file2 - e.g. file "/a/b/../b/c"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||