Package org.assertj.core.error
Class BasicErrorMessageFactory
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
- All Implemented Interfaces:
ErrorMessageFactory
- Direct Known Subclasses:
AbstractShouldHaveTextContent
,ActualIsNotEmpty
,AnyElementShouldMatch
,ClassModifierShouldBe
,ConditionAndGroupGenericParameterTypeShouldBeTheSame
,ElementsShouldBe
,ElementsShouldBeAtLeast
,ElementsShouldBeAtMost
,ElementsShouldBeExactly
,ElementsShouldHave
,ElementsShouldHaveAtLeast
,ElementsShouldHaveAtMost
,ElementsShouldHaveExactly
,ElementsShouldMatch
,ElementsShouldNotBe
,ElementsShouldNotHave
,ElementsShouldSatisfy
,MatcherShouldMatch
,NoElementsShouldMatch
,NoElementsShouldSatisfy
,OptionalDoubleShouldHaveValueCloseToOffset
,OptionalDoubleShouldHaveValueCloseToPercentage
,OptionalShouldBeEmpty
,OptionalShouldBePresent
,OptionalShouldContain
,OptionalShouldContainInstanceOf
,ShouldAccept
,ShouldBe
,ShouldBeAbsolutePath
,ShouldBeAbstract
,ShouldBeAfter
,ShouldBeAfterOrEqualTo
,ShouldBeAfterYear
,ShouldBeAlphabetic
,ShouldBeAlphanumeric
,ShouldBeAnArray
,ShouldBeAnnotation
,ShouldBeASCII
,ShouldBeAssignableFrom
,ShouldBeAssignableTo
,ShouldBeAtIndex
,ShouldBeAtSameInstant
,ShouldBeBase64
,ShouldBeBefore
,ShouldBeBeforeOrEqualTo
,ShouldBeBeforeYear
,ShouldBeBetween
,ShouldBeBlank
,ShouldBeCancelled
,ShouldBeCanonicalPath
,ShouldBeCloseTo
,ShouldBeCompleted
,ShouldBeCompletedExceptionally
,ShouldBeCompletedWithin
,ShouldBeDirectory
,ShouldBeDone
,ShouldBeEmpty
,ShouldBeEmptyDirectory
,ShouldBeEqualByComparingFieldByFieldRecursively
,ShouldBeEqualByComparingOnlyGivenFields
,ShouldBeEqualIgnoringCase
,ShouldBeEqualIgnoringHours
,ShouldBeEqualIgnoringMinutes
,ShouldBeEqualIgnoringNanos
,ShouldBeEqualIgnoringNewLineDifferences
,ShouldBeEqualIgnoringNewLines
,ShouldBeEqualIgnoringSeconds
,ShouldBeEqualIgnoringTimezone
,ShouldBeEqualIgnoringWhitespace
,ShouldBeEqualNormalizingPunctuationAndWhitespace
,ShouldBeEqualNormalizingUnicode
,ShouldBeEqualNormalizingWhitespace
,ShouldBeEqualToIgnoringFields
,ShouldBeEqualToWithSortedQueryParameters
,ShouldBeEqualWithinOffset
,ShouldBeEqualWithinPercentage
,ShouldBeEqualWithTimePrecision
,ShouldBeEven
,ShouldBeExactlyInstanceOf
,ShouldBeExecutable
,ShouldBeExhausted
,ShouldBeFalse
,ShouldBeFile
,ShouldBeFinite
,ShouldBeGreater
,ShouldBeGreaterOrEqual
,ShouldBeHexadecimal
,ShouldBeIn
,ShouldBeInfinite
,ShouldBeInSameDay
,ShouldBeInSameHour
,ShouldBeInSameHourWindow
,ShouldBeInSameMinute
,ShouldBeInSameMinuteWindow
,ShouldBeInSameMonth
,ShouldBeInSameSecond
,ShouldBeInSameSecondWindow
,ShouldBeInSameYear
,ShouldBeInstance
,ShouldBeInstanceOfAny
,ShouldBeInterface
,ShouldBeInTheFuture
,ShouldBeInThePast
,ShouldBeLess
,ShouldBeLessOrEqual
,ShouldBeLowerCase
,ShouldBeMarked
,ShouldBeMixedCase
,ShouldBeNormalized
,ShouldBeNullOrEmpty
,ShouldBeNumeric
,ShouldBeOdd
,ShouldBeOfClassIn
,ShouldBePeriod
,ShouldBePrimitive
,ShouldBePrintable
,ShouldBeReadable
,ShouldBeRecord
,ShouldBeRegularFile
,ShouldBeRelativePath
,ShouldBeSame
,ShouldBeSealed
,ShouldBeSorted
,ShouldBeSubsetOf
,ShouldBeSubstring
,ShouldBeSymbolicLink
,ShouldBeToday
,ShouldBeTrue
,ShouldBeUnmodifiable
,ShouldBeUpperCase
,ShouldBeVisible
,ShouldBeWritable
,ShouldContain
,ShouldContainAnyOf
,ShouldContainAtIndex
,ShouldContainCharSequence
,ShouldContainCharSequenceOnlyOnce
,ShouldContainEntries
,ShouldContainEntry
,ShouldContainExactly
,ShouldContainExactlyInAnyOrder
,ShouldContainKey
,ShouldContainKeys
,ShouldContainNull
,ShouldContainOneOrMoreWhitespaces
,ShouldContainOnly
,ShouldContainOnlyDigits
,ShouldContainOnlyKeys
,ShouldContainOnlyNulls
,ShouldContainOnlyWhitespaces
,ShouldContainPattern
,ShouldContainRecursively
,ShouldContainSequence
,ShouldContainSequenceOfCharSequence
,ShouldContainsOnlyOnce
,ShouldContainSubsequence
,ShouldContainSubsequenceOfCharSequence
,ShouldContainValue
,ShouldContainValues
,ShouldEndWith
,ShouldEndWithIgnoringCase
,ShouldEndWithPath
,ShouldExist
,ShouldHave
,ShouldHaveAllNullFields
,ShouldHaveAnchor
,ShouldHaveAnnotations
,ShouldHaveAtIndex
,ShouldHaveAtLeastOneElementOfType
,ShouldHaveAuthority
,ShouldHaveBinaryContent
,ShouldHaveCause
,ShouldHaveCauseExactlyInstance
,ShouldHaveCauseInstance
,ShouldHaveCauseReference
,ShouldHaveDateField
,ShouldHaveDigest
,ShouldHaveDimensions
,ShouldHaveDuration
,ShouldHaveExactlyTypes
,ShouldHaveExtension
,ShouldHaveFailed
,ShouldHaveFailedWithin
,ShouldHaveFields
,ShouldHaveFileSystem
,ShouldHaveFragment
,ShouldHaveHost
,ShouldHaveLineCount
,ShouldHaveMessage
,ShouldHaveMessageFindingMatchRegex
,ShouldHaveMessageMatchingRegex
,ShouldHaveMethods
,ShouldHaveName
,ShouldHaveNext
,ShouldHaveNoCause
,ShouldHaveNoExtension
,ShouldHaveNoFields
,ShouldHaveNoHost
,ShouldHaveNoNullFields
,ShouldHaveNoPackage
,ShouldHaveNoParent
,ShouldHaveNoSuperclass
,ShouldHaveNoSuppressedExceptions
,ShouldHaveOnlyElementsOfType
,ShouldHavePackage
,ShouldHaveParameter
,ShouldHaveParent
,ShouldHavePath
,ShouldHavePeriod
,ShouldHavePort
,ShouldHavePropertyOrField
,ShouldHavePropertyOrFieldWithValue
,ShouldHaveProtocol
,ShouldHaveQuery
,ShouldHaveRecordComponents
,ShouldHaveReference
,ShouldHaveRootCause
,ShouldHaveRootCauseExactlyInstance
,ShouldHaveRootCauseInstance
,ShouldHaveSameClass
,ShouldHaveSameDimensionsAs
,ShouldHaveSameFileSystemAs
,ShouldHaveSameHashCode
,ShouldHaveSameHourAs
,ShouldHaveSameSizeAs
,ShouldHaveSameTime
,ShouldHaveScale
,ShouldHaveScheme
,ShouldHaveSize
,ShouldHaveSizeBetween
,ShouldHaveSizeGreaterThan
,ShouldHaveSizeGreaterThanOrEqualTo
,ShouldHaveSizeLessThan
,ShouldHaveSizeLessThanOrEqualTo
,ShouldHaveStamp
,ShouldHaveSuperclass
,ShouldHaveSuppressedException
,ShouldHaveTime
,ShouldHaveToString
,ShouldHaveUserInfo
,ShouldHaveValue
,ShouldMatch
,ShouldMatchPattern
,ShouldNotAccept
,ShouldNotBe
,ShouldNotBeBetween
,ShouldNotBeBlank
,ShouldNotBeCancelled
,ShouldNotBeCompleted
,ShouldNotBeCompletedExceptionally
,ShouldNotBeDone
,ShouldNotBeEmpty
,ShouldNotBeEqual
,ShouldNotBeEqualComparingFieldByFieldRecursively
,ShouldNotBeEqualIgnoringCase
,ShouldNotBeEqualIgnoringWhitespace
,ShouldNotBeEqualNormalizingWhitespace
,ShouldNotBeEqualWithinOffset
,ShouldNotBeEqualWithinPercentage
,ShouldNotBeExactlyInstanceOf
,ShouldNotBeFinite
,ShouldNotBeIn
,ShouldNotBeInfinite
,ShouldNotBeInstance
,ShouldNotBeInstanceOfAny
,ShouldNotBeNull
,ShouldNotBeOfClassIn
,ShouldNotBePrimitive
,ShouldNotBeSame
,ShouldNotContain
,ShouldNotContainAnyWhitespaces
,ShouldNotContainAtIndex
,ShouldNotContainCharSequence
,ShouldNotContainKey
,ShouldNotContainKeys
,ShouldNotContainNull
,ShouldNotContainOnlyWhitespaces
,ShouldNotContainPattern
,ShouldNotContainSequence
,ShouldNotContainSubsequence
,ShouldNotContainValue
,ShouldNotEndWith
,ShouldNotEndWithIgnoringCase
,ShouldNotExist
,ShouldNotHave
,ShouldNotHaveAnyElementsOfTypes
,ShouldNotHaveDuplicates
,ShouldNotHaveFailed
,ShouldNotHaveSameClass
,ShouldNotHaveSameHashCode
,ShouldNotHaveThrown
,ShouldNotHaveToString
,ShouldNotMatch
,ShouldNotMatchPattern
,ShouldNotSatisfyPredicateRecursively
,ShouldNotStartWith
,ShouldNotStartWithIgnoringCase
,ShouldOnlyHaveElementsOfTypes
,ShouldOnlyHaveFields
,ShouldSatisfy
,ShouldSatisfyOnlyOnce
,ShouldStartWith
,ShouldStartWithIgnoringCase
,ShouldStartWithPath
,SubarraysShouldHaveSameSize
,ZippedElementsShouldSatisfy
A factory of error messages typically shown when an assertion fails.
- Author:
- Alex Ruiz
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBasicErrorMessageFactory
(String format, Object... arguments) Creates a new
.BasicErrorMessageFactory
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates a new error message as a result of a failed assertion without description.Creates a new error message as a result of a failed assertion withStandardRepresentation
.create
(Description d, Representation representation) Creates a new error message as a result of a failed assertion.boolean
int
hashCode()
toString()
protected static CharSequence
unquotedString
(String string) Return a string who will be unquoted in message format (without '')
-
Field Details
-
format
-
arguments
-
-
Constructor Details
-
BasicErrorMessageFactory
Creates a new
.BasicErrorMessageFactory
- Parameters:
format
- the format string.arguments
- arguments referenced by the format specifiers in the format string.
-
-
Method Details
-
create
Creates a new error message as a result of a failed assertion.- Specified by:
create
in interfaceErrorMessageFactory
- Parameters:
d
- the description of the failed assertion.representation
- the representation used- Returns:
- the created error message.
-
create
Creates a new error message as a result of a failed assertion withStandardRepresentation
.- Specified by:
create
in interfaceErrorMessageFactory
- Parameters:
d
- the description of the failed assertion.- Returns:
- the created error message.
-
create
Creates a new error message as a result of a failed assertion without description.- Specified by:
create
in interfaceErrorMessageFactory
- Returns:
- the created error message.
-
unquotedString
Return a string who will be unquoted in message format (without '')- Parameters:
string
- the string who will be unquoted.- Returns:
- an unquoted string in message format.
-
equals
-
hashCode
public int hashCode() -
toString
-