org.dbunit.testutil
Class FileAsserts
java.lang.Object
org.dbunit.testutil.FileAsserts
public class FileAsserts
- extends Object
Simple utility to compare file or stream data with each other.
From "Dale E Martin" dmartin@c..
Date Thursday, March 14, 2002 2:42 pm
To junit@yahoogroups.com
Subject [junit] file assert, a starting point
OK, this isn't rocket science or anything but it's working for me. What it
is is a couple of assert methods that compare files, so your expected
results can be located in a file.
I did not use the diff library as the docs are in French, which I have not
studied for about 15 years and am not ready to pick back up ;-)
I declare this code to be open to the public domain and anyone may do
anything they like with it. Before inclusion in JUnit I'm sure you'll need
to tweak it some, but it's working for my needs and maybe it will help
someone else.
Later,
Dale
- Since:
- ? (pre 2.2)
- Version:
- $Revision: 879 $ $Date: 2008-11-16 14:09:08 +0100 (Sun, 16 Nov 2008) $
- Author:
- Dale E Martin, Last changed by: $Author: gommma $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileAsserts
public FileAsserts()
assertEquals
public static void assertEquals(BufferedReader expected,
BufferedReader actual)
throws Exception
- Throws:
Exception
assertEquals
public static void assertEquals(InputStream expected,
File actual)
throws Exception
- Throws:
Exception
assertEquals
public static void assertEquals(File expected,
File actual)
throws Exception
- Throws:
Exception
Copyright © 2002-2012. All Rights Reserved.