Package org.fest.assertions.error
Class BasicErrorMessageFactory
- java.lang.Object
-
- org.fest.assertions.error.BasicErrorMessageFactory
-
- All Implemented Interfaces:
ErrorMessageFactory
- Direct Known Subclasses:
AbstractShouldHaveTextContent,ConditionAndGroupGenericParameterTypeShouldBeTheSame,ElementsShouldBe,ElementsShouldBeAtLeast,ElementsShouldBeAtMost,ElementsShouldBeExactly,ElementsShouldHave,ElementsShouldHaveAtLeast,ElementsShouldHaveAtMost,ElementsShouldHaveExactly,ElementsShouldNotBe,ElementsShouldNotBeAtLeast,ElementsShouldNotBeAtMost,ElementsShouldNotBeExactly,ElementsShouldNotHave,ElementsShouldNotHaveAtLeast,ElementsShouldNotHaveAtMost,ElementsShouldNotHaveExactly,ShouldBe,ShouldBeAbsolutePath,ShouldBeAfter,ShouldBeAfterOrEqualsTo,ShouldBeAtIndex,ShouldBeBefore,ShouldBeBeforeOrEqualsTo,ShouldBeBetween,ShouldBeCloseTo,ShouldBeDirectory,ShouldBeEmpty,ShouldBeEqualIgnoringCase,ShouldBeEqualImages,ShouldBeEqualWithinOffset,ShouldBeExactlyInstanceOf,ShouldBeExecutable,ShouldBeFile,ShouldBeGreater,ShouldBeGreaterOrEqual,ShouldBeIn,ShouldBeInSameDay,ShouldBeInSameHour,ShouldBeInSameMillisecond,ShouldBeInSameMinute,ShouldBeInSameMonth,ShouldBeInSameSecond,ShouldBeInSameYear,ShouldBeInstance,ShouldBeInstanceOfAny,ShouldBeInTheFuture,ShouldBeInThePast,ShouldBeLenientEqualByAccepting,ShouldBeLenientEqualByIgnoring,ShouldBeLess,ShouldBeLessOrEqual,ShouldBeLowerCase,ShouldBeNullOrEmpty,ShouldBeOfClassIn,ShouldBeReadable,ShouldBeRelativePath,ShouldBeSame,ShouldBeSorted,ShouldBeSubsetOf,ShouldBeToday,ShouldBeUpperCase,ShouldBeWithin,ShouldBeWritable,ShouldContain,ShouldContainAtIndex,ShouldContainExactly,ShouldContainKey,ShouldContainNull,ShouldContainOnly,ShouldContainSequence,ShouldContainString,ShouldContainStringOnlyOnce,ShouldContainValue,ShouldEndWith,ShouldExist,ShouldHave,ShouldHaveAtIndex,ShouldHaveBinaryContent,ShouldHaveMessage,ShouldHaveNoCause,ShouldHaveSameClass,ShouldHaveSameSizeAs,ShouldHaveSize,ShouldHaveTime,ShouldMatchPattern,ShouldNotBe,ShouldNotBeBetween,ShouldNotBeEqual,ShouldNotBeExactlyInstanceOf,ShouldNotBeIn,ShouldNotBeInstance,ShouldNotBeInstanceOfAny,ShouldNotBeOfClassIn,ShouldNotBeSame,ShouldNotContain,ShouldNotContainAtIndex,ShouldNotContainKey,ShouldNotContainNull,ShouldNotContainString,ShouldNotContainValue,ShouldNotExist,ShouldNotHave,ShouldNotHaveDuplicates,ShouldNotHaveSameClass,ShouldNotMatchPattern,ShouldStartWith
public class BasicErrorMessageFactory extends java.lang.Object implements ErrorMessageFactory
A factory of error messages typically shown when an assertion fails.- Author:
- Alex Ruiz
-
-
Constructor Summary
Constructors Constructor Description BasicErrorMessageFactory(java.lang.String format, java.lang.Object... arguments)Creates a newBasicErrorMessageFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcreate(Description d)Creates a new error message as a result of a failed assertion.booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
BasicErrorMessageFactory
public BasicErrorMessageFactory(java.lang.String format, java.lang.Object... arguments)Creates a newBasicErrorMessageFactory.- Parameters:
format- the format string.arguments- arguments referenced by the format specifiers in the format string.
-
-
Method Detail
-
create
public java.lang.String create(Description d)
Creates a new error message as a result of a failed assertion.- Specified by:
createin interfaceErrorMessageFactory- Parameters:
d- the description of the failed assertion.- Returns:
- the created error message.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-