ErrorMessageFactory
AbstractShouldHaveTextContent
, ClassModifierShouldBe
, ConditionAndGroupGenericParameterTypeShouldBeTheSame
, ElementsShouldBe
, ElementsShouldBeAtLeast
, ElementsShouldBeAtMost
, ElementsShouldBeExactly
, ElementsShouldHave
, ElementsShouldHaveAtLeast
, ElementsShouldHaveAtMost
, ElementsShouldHaveExactly
, ElementsShouldMatch
, ElementsShouldNotBe
, ElementsShouldNotHave
, ElementsShouldSatisfy
, NoElementsShouldMatch
, OptionalDoubleShouldHaveValueCloseTo
, OptionalShouldBeEmpty
, OptionalShouldBePresent
, OptionalShouldContain
, OptionalShouldContainInstanceOf
, ShouldAccept
, ShouldBe
, ShouldBeAbsolutePath
, ShouldBeAfter
, ShouldBeAfterOrEqualsTo
, ShouldBeAfterYear
, ShouldBeAnArray
, ShouldBeAnnotation
, ShouldBeAssignableFrom
, ShouldBeAtIndex
, ShouldBeBefore
, ShouldBeBeforeOrEqualsTo
, ShouldBeBeforeYear
, ShouldBeBetween
, ShouldBeBlank
, ShouldBeCancelled
, ShouldBeCanonicalPath
, ShouldBeCloseTo
, ShouldBeCompleted
, ShouldBeCompletedExceptionally
, ShouldBeDirectory
, ShouldBeDone
, ShouldBeEmpty
, ShouldBeEqualByComparingFieldByFieldRecursively
, ShouldBeEqualByComparingOnlyGivenFields
, ShouldBeEqualIgnoringCase
, ShouldBeEqualIgnoringHours
, ShouldBeEqualIgnoringMinutes
, ShouldBeEqualIgnoringNanos
, ShouldBeEqualIgnoringNewLineDifferences
, ShouldBeEqualIgnoringSeconds
, ShouldBeEqualIgnoringTimezone
, ShouldBeEqualIgnoringWhitespace
, ShouldBeEqualNormalizingWhitespace
, ShouldBeEqualToIgnoringFields
, ShouldBeEqualWithinOffset
, ShouldBeEqualWithinPercentage
, ShouldBeEqualWithTimePrecision
, ShouldBeExactlyInstanceOf
, ShouldBeExecutable
, ShouldBeFile
, ShouldBeGreater
, ShouldBeGreaterOrEqual
, ShouldBeIn
, ShouldBeInSameDay
, ShouldBeInSameHour
, ShouldBeInSameHourWindow
, ShouldBeInSameMinute
, ShouldBeInSameMinuteWindow
, ShouldBeInSameMonth
, ShouldBeInSameSecond
, ShouldBeInSameSecondWindow
, ShouldBeInSameYear
, ShouldBeInstance
, ShouldBeInstanceOfAny
, ShouldBeInterface
, ShouldBeInTheFuture
, ShouldBeInThePast
, ShouldBeLess
, ShouldBeLessOrEqual
, ShouldBeLowerCase
, ShouldBeMarked
, ShouldBeNormalized
, ShouldBeNullOrEmpty
, ShouldBeOfClassIn
, ShouldBeReadable
, ShouldBeRegularFile
, ShouldBeRelativePath
, ShouldBeSame
, ShouldBeSorted
, ShouldBeSubsetOf
, ShouldBeSubstring
, ShouldBeSymbolicLink
, ShouldBeToday
, ShouldBeUpperCase
, ShouldBeWritable
, ShouldContain
, ShouldContainAnyOf
, ShouldContainAtIndex
, ShouldContainCharSequence
, ShouldContainCharSequenceOnlyOnce
, ShouldContainCharSequenceSequence
, ShouldContainEntry
, ShouldContainExactly
, ShouldContainExactlyInAnyOrder
, ShouldContainKey
, ShouldContainKeys
, ShouldContainNull
, ShouldContainOnly
, ShouldContainOnlyDigits
, ShouldContainOnlyKeys
, ShouldContainPattern
, ShouldContainSequence
, ShouldContainsOnlyOnce
, ShouldContainSubsequence
, ShouldContainValue
, ShouldContainValues
, ShouldEndWith
, ShouldEndWithPath
, ShouldExist
, ShouldHave
, ShouldHaveAnchor
, ShouldHaveAnnotations
, ShouldHaveAtIndex
, ShouldHaveAtLeastOneElementOfType
, ShouldHaveAuthority
, ShouldHaveBinaryContent
, ShouldHaveCause
, ShouldHaveCauseExactlyInstance
, ShouldHaveCauseInstance
, ShouldHaveDateField
, ShouldHaveExtension
, ShouldHaveFailed
, ShouldHaveFields
, ShouldHaveFragment
, ShouldHaveHost
, ShouldHaveLineCount
, ShouldHaveMessage
, ShouldHaveMessageMatchingRegex
, ShouldHaveMethods
, ShouldHaveName
, ShouldHaveNoCause
, ShouldHaveNoFields
, ShouldHaveNoNullFields
, ShouldHaveNoParent
, ShouldHaveNoSuppressedExceptions
, ShouldHaveOnlyElementsOfType
, ShouldHaveParameter
, ShouldHaveParent
, ShouldHavePath
, ShouldHavePort
, ShouldHavePropertyOrField
, ShouldHavePropertyOrFieldWithValue
, ShouldHaveProtocol
, ShouldHaveQuery
, ShouldHaveReference
, ShouldHaveRootCauseExactlyInstance
, ShouldHaveRootCauseInstance
, ShouldHaveSameClass
, ShouldHaveSameHourAs
, ShouldHaveSameSizeAs
, ShouldHaveSameTime
, ShouldHaveScheme
, ShouldHaveSize
, ShouldHaveStamp
, ShouldHaveSuppressedException
, ShouldHaveTime
, ShouldHaveToString
, ShouldHaveUserInfo
, ShouldHaveValue
, ShouldMatch
, ShouldMatchPattern
, ShouldNotAccept
, ShouldNotBe
, ShouldNotBeBetween
, ShouldNotBeBlank
, ShouldNotBeCancelled
, ShouldNotBeCompleted
, ShouldNotBeCompletedExceptionally
, ShouldNotBeDone
, ShouldNotBeEmpty
, ShouldNotBeEqual
, ShouldNotBeEqualIgnoringCase
, ShouldNotBeEqualIgnoringWhitespace
, ShouldNotBeEqualNormalizingWhitespace
, ShouldNotBeEqualWithinOffset
, ShouldNotBeEqualWithinPercentage
, ShouldNotBeExactlyInstanceOf
, ShouldNotBeIn
, ShouldNotBeInstance
, ShouldNotBeInstanceOfAny
, ShouldNotBeNull
, ShouldNotBeOfClassIn
, ShouldNotBeSame
, ShouldNotContain
, ShouldNotContainAtIndex
, ShouldNotContainCharSequence
, ShouldNotContainKey
, ShouldNotContainKeys
, ShouldNotContainNull
, ShouldNotContainPattern
, ShouldNotContainSequence
, ShouldNotContainSubsequence
, ShouldNotContainValue
, ShouldNotEndWith
, ShouldNotExist
, ShouldNotHave
, ShouldNotHaveDuplicates
, ShouldNotHaveFailed
, ShouldNotHaveSameClass
, ShouldNotHaveThrown
, ShouldNotMatch
, ShouldNotMatchPattern
, ShouldNotStartWith
, ShouldOnlyHaveElementsOfTypes
, ShouldOnlyHaveFields
, ShouldStartWith
, ShouldStartWithPath
public class BasicErrorMessageFactory extends Object implements ErrorMessageFactory
Modifier and Type | Field | Description |
---|---|---|
protected Object[] |
arguments |
|
protected String |
format |
Constructor | Description |
---|---|
BasicErrorMessageFactory(String format,
Object... arguments) |
Creates a new
BasicErrorMessageFactory . |
Modifier and Type | Method | Description |
---|---|---|
String |
create() |
Creates a new error message as a result of a failed assertion without description.
|
String |
create(Description d) |
Creates a new error message as a result of a failed assertion with
StandardRepresentation . |
String |
create(Description d,
Representation representation) |
Creates a new error message as a result of a failed assertion.
|
boolean |
equals(Object obj) |
|
int |
hashCode() |
|
String |
toString() |
|
protected static CharSequence |
unquotedString(String string) |
Return a string who will be unquoted in message format (without '')
|
public BasicErrorMessageFactory(String format, Object... arguments)
BasicErrorMessageFactory
.format
- the format string.arguments
- arguments referenced by the format specifiers in the format string.public String create(Description d, Representation representation)
create
in interface ErrorMessageFactory
d
- the description of the failed assertion.public String create(Description d)
StandardRepresentation
.create
in interface ErrorMessageFactory
d
- the description of the failed assertion.public String create()
create
in interface ErrorMessageFactory
protected static CharSequence unquotedString(String string)
string
- the string who will be unquoted.Copyright © 2014–2019. All rights reserved.