JUnit-addons
version 1.4

junitx.framework
Class Assert

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junitx.framework.Assert

public class Assert
extends junit.framework.Assert

A set of assert methods (primarly testing the negative assertion of the correspondent methods found in the junit.framework.Assert class).

Usage

    import junitx.framework.Assert;

    Assert.assertNotEquals(expected, actual);
 

Version:
$Revision: 1.13 $ $Date: 2003/03/21 06:13:49 $
Author:
Vladimir R. Bossicard

Method Summary
static void assertEquals(java.lang.String expected, java.lang.String actual)
          Asserts that two strings are equal.
static void assertEquals(java.lang.String message, java.lang.String expected, java.lang.String actual)
          Asserts that two strings are equal.
static void assertFalse(boolean condition)
          Asserts that a condition is false.
static void assertFalse(java.lang.String message, boolean condition)
          Asserts that a condition is false.
static void assertNotEquals(boolean expected, boolean actual)
          Asserts that two booleans are not equal.
static void assertNotEquals(byte expected, byte actual)
          Asserts that two bytes are not equal.
static void assertNotEquals(char expected, char actual)
          Asserts that two chars are not equal.
static void assertNotEquals(double expected, double actual, double delta)
          Asserts that two doubles are not equal concerning a delta.
static void assertNotEquals(float expected, float actual, float delta)
          Asserts that two floats are not equal concerning a delta.
static void assertNotEquals(int expected, int actual)
          Asserts that two ints are not equal.
static void assertNotEquals(long expected, long actual)
          Asserts that two longs are not equal.
static void assertNotEquals(java.lang.Object expected, java.lang.Object actual)
          Asserts that two objects are not equal.
static void assertNotEquals(short expected, short actual)
          Asserts that two shorts are not equal.
static void assertNotEquals(java.lang.String message, boolean expected, boolean actual)
          Asserts that two boolean are not equal.
static void assertNotEquals(java.lang.String message, byte expected, byte actual)
          Asserts that two bytes are not equal.
static void assertNotEquals(java.lang.String message, char expected, char actual)
          Asserts that two chars are not equal.
static void assertNotEquals(java.lang.String message, double expected, double actual, double delta)
          Asserts that two doubles are not equal concerning a delta.
static void assertNotEquals(java.lang.String message, float expected, float actual, float delta)
          Asserts that two floats are not equal concerning a delta.
static void assertNotEquals(java.lang.String message, int expected, int actual)
          Asserts that two ints are not equal.
static void assertNotEquals(java.lang.String message, long expected, long actual)
          Asserts that longs objects are not equal.
static void assertNotEquals(java.lang.String message, java.lang.Object expected, java.lang.Object actual)
          Asserts that two objects are not equal.
static void assertNotEquals(java.lang.String message, short expected, short actual)
          Asserts that two shorts are not equal.
static void assertNotSame(java.lang.Object expected, java.lang.Object actual)
          Asserts that two objects do not refer to the same object.
static void assertNotSame(java.lang.String message, java.lang.Object expected, java.lang.Object actual)
          Asserts that two objects do not refer to the same object.
static void fail(java.lang.String message, java.lang.Throwable cause)
          Fails a test with the given message and the Throwable object causing the failure.
static void fail(java.lang.Throwable cause)
          Fails a test with the given Throwable object causing the failure.
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertFalse

public static void assertFalse(java.lang.String message,
                               boolean condition)
Asserts that a condition is false. Throws a junitx.framework.ComparisonFailure if not.

See Also:
ComparisonFailure

assertFalse

public static void assertFalse(boolean condition)
Asserts that a condition is false. Throws a junitx.framework.ComparisonFailure if not.

See Also:
ComparisonFailure

assertEquals

public static void assertEquals(java.lang.String expected,
                                java.lang.String actual)
Asserts that two strings are equal. Throws an AssertionFailedError if not.


assertEquals

public static void assertEquals(java.lang.String message,
                                java.lang.String expected,
                                java.lang.String actual)
Asserts that two strings are equal. Throws an AssertionFailedError if not.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   java.lang.Object expected,
                                   java.lang.Object actual)
Asserts that two objects are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.Object expected,
                                   java.lang.Object actual)
Asserts that two objects are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   byte expected,
                                   byte actual)
Asserts that two bytes are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(byte expected,
                                   byte actual)
Asserts that two bytes are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   char expected,
                                   char actual)
Asserts that two chars are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(char expected,
                                   char actual)
Asserts that two chars are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   double expected,
                                   double actual,
                                   double delta)
Asserts that two doubles are not equal concerning a delta. If the expected value is infinity then the delta value is ignored. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(double expected,
                                   double actual,
                                   double delta)
Asserts that two doubles are not equal concerning a delta. If the expected value is infinity then the delta value is ignored. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   float expected,
                                   float actual,
                                   float delta)
Asserts that two floats are not equal concerning a delta. If the expected value is infinity then the delta value is ignored. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(float expected,
                                   float actual,
                                   float delta)
Asserts that two floats are not equal concerning a delta. If the expected value is infinity then the delta value is ignored. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   int expected,
                                   int actual)
Asserts that two ints are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(int expected,
                                   int actual)
Asserts that two ints are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   long expected,
                                   long actual)
Asserts that longs objects are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(long expected,
                                   long actual)
Asserts that two longs are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   short expected,
                                   short actual)
Asserts that two shorts are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(short expected,
                                   short actual)
Asserts that two shorts are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(java.lang.String message,
                                   boolean expected,
                                   boolean actual)
Asserts that two boolean are not equal. Throws an AssertionFailedError if they are equal.


assertNotEquals

public static void assertNotEquals(boolean expected,
                                   boolean actual)
Asserts that two booleans are not equal. Throws an AssertionFailedError if they are equal.


assertNotSame

public static void assertNotSame(java.lang.String message,
                                 java.lang.Object expected,
                                 java.lang.Object actual)
Asserts that two objects do not refer to the same object. Throws an AssertionFailedError if they are equal.


assertNotSame

public static void assertNotSame(java.lang.Object expected,
                                 java.lang.Object actual)
Asserts that two objects do not refer to the same object. Throws an AssertionFailedError if they are equal.


fail

public static void fail(java.lang.Throwable cause)
Fails a test with the given Throwable object causing the failure.


fail

public static void fail(java.lang.String message,
                        java.lang.Throwable cause)
Fails a test with the given message and the Throwable object causing the failure.


JUnit-addons
version 1.4

Copyright © 2002-2003 Vladimir R. Bossicard. All Rights Reserved.