org.fest.assertions.error
Class BasicErrorMessageFactory

java.lang.Object
  extended by org.fest.assertions.error.BasicErrorMessageFactory
All Implemented Interfaces:
ErrorMessageFactory
Direct Known Subclasses:
ConditionAndGroupGenericParameterTypeShouldBeTheSame, ElementsShouldBe, ElementsShouldBeAtLeast, ElementsShouldBeAtMost, ElementsShouldBeExactly, ElementsShouldHave, ElementsShouldHaveAtLeast, ElementsShouldHaveAtMost, ElementsShouldHaveExactly, ElementsShouldNotBe, ElementsShouldNotBeAtLeast, ElementsShouldNotBeAtMost, ElementsShouldNotBeExactly, ElementsShouldNotHave, ElementsShouldNotHaveAtLeast, ElementsShouldNotHaveAtMost, ElementsShouldNotHaveExactly, ShouldBe, ShouldBeAbsolutePath, ShouldBeAfter, ShouldBeAfterOrEqualsTo, ShouldBeBefore, ShouldBeBeforeOrEqualsTo, ShouldBeBetween, ShouldBeCloseTo, ShouldBeDirectory, ShouldBeEmpty, ShouldBeEqualColors, ShouldBeEqualIgnoringCase, ShouldBeEqualImages, ShouldBeEqualWithinOffset, ShouldBeExactlyInstanceOf, ShouldBeFile, ShouldBeGreater, ShouldBeGreaterOrEqual, ShouldBeIn, ShouldBeInSameDay, ShouldBeInSameHour, ShouldBeInSameMillisecond, ShouldBeInSameMinute, ShouldBeInSameMonth, ShouldBeInSameSecond, ShouldBeInSameYear, ShouldBeInstance, ShouldBeInstanceOfAny, ShouldBeInTheFuture, ShouldBeInThePast, ShouldBeLenientEqualByAccepting, ShouldBeLenientEqualByIgnoring, ShouldBeLess, ShouldBeLessOrEqual, ShouldBeLowerCase, ShouldBeNullOrEmpty, ShouldBeRelativePath, ShouldBeSame, ShouldBeSorted, ShouldBeSubsetOf, ShouldBeToday, ShouldBeUpperCase, ShouldBeWithin, ShouldContain, ShouldContainAtIndex, ShouldContainNull, ShouldContainOnly, ShouldContainSequence, ShouldContainString, ShouldEndWith, ShouldExist, ShouldHave, ShouldHaveEqualContent, ShouldHaveMessage, ShouldHaveNoCause, ShouldHaveSameSizeAs, ShouldHaveSize, ShouldMatchPattern, ShouldNotBe, ShouldNotBeBetween, ShouldNotBeEqual, ShouldNotBeIn, ShouldNotBeSame, ShouldNotContain, ShouldNotContainAtIndex, ShouldNotContainNull, ShouldNotContainString, ShouldNotExist, ShouldNotHave, ShouldNotHaveDuplicates, ShouldNotMatchPattern, ShouldStartWith

public class BasicErrorMessageFactory
extends Object
implements ErrorMessageFactory

A factory of error messages typically shown when an assertion fails.

Author:
Alex Ruiz

Constructor Summary
BasicErrorMessageFactory(String format, Object... arguments)
          Creates a new BasicErrorMessageFactory.
 
Method Summary
 String create(Description d)
          Creates a new error message as a result of a failed assertion.
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicErrorMessageFactory

public BasicErrorMessageFactory(String format,
                                Object... arguments)
Creates a new BasicErrorMessageFactory.

Parameters:
format - the format string.
arguments - arguments referenced by the format specifiers in the format string.
Method Detail

create

public String create(Description d)
Creates a new error message as a result of a failed assertion.

Specified by:
create in interface ErrorMessageFactory
Parameters:
d - the description of the failed assertion.
Returns:
the created error message.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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