Documentation of 'org.freehep.util.Assert' Java class
Assert
org.freehep.util

Class Assert



  • public class Assert
    extends junit.framework.Assert
    Additional assert methods to the junit.framework.Assert class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void assertEquals(java.io.File expected, java.io.File actual, boolean isBinary)
      Compares two files.
      static void assertEquals(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
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • assertEquals

        public static void assertEquals(java.io.File expected,
                                        java.io.File actual,
                                        boolean isBinary)
                                 throws java.io.FileNotFoundException,
                                        java.io.IOException
        Compares two files. The files may be gzipped, and will then be uncompressed on the fly.
        Parameters:
        expected - reference file
        actual - file to be tested
        isBinary - 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.IOException
        Compares two streams.
        Parameters:
        expected - reference stream
        actual - stream to be tested
        filename - 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

You see the box below because you did not login.