org.fest.assertions
Class ComparisonFailureFactory

java.lang.Object
  extended by org.fest.assertions.ComparisonFailureFactory

public final class ComparisonFailureFactory
extends Object

Understands creation of JUnit's ComparisonFailure.

Author:
Yvonne Wang, Alex Ruiz

Method Summary
static AssertionError comparisonFailure(String message, Object expected, Object actual)
          Creates a new instance of JUnit's ComparisonFailure only if JUnit 4+ is in the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

comparisonFailure

public static AssertionError comparisonFailure(String message,
                                               Object expected,
                                               Object actual)
Creates a new instance of JUnit's ComparisonFailure only if JUnit 4+ is in the classpath.

Parameters:
message - the identifying message or null.
expected - the expected value.
actual - the actual value.
Returns:
the created ComparisonFailure, or null if JUnit 4+ is not in the classpath.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.