Top Description Fields Constructors Methods
org.hamcrest.text

public Class IsEqualIgnoringCase

extends TypeSafeMatcher<String>
Class Inheritance
Imports
org.hamcrest.Description, .Matcher, .TypeSafeMatcher

Tests if a string is equal to another string, regardless of the case.

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
describeMismatchSafely(String item, Description mismatchDescription)

Overrides org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Subclasses should override this.
public void
describeTo(Description
The description to be built or appended to.
description
)

Implements org.hamcrest.SelfDescribing.describeTo.

Generates a description of the object.
public static Matcher<String>
equalToIgnoringCase(String
the expected value of matched strings
expectedString
)

Creates a matcher of String that matches when the examined string is equal to the specified expectedString, ignoring case.

public boolean
matchesSafely(String item)

Implements abstract org.hamcrest.TypeSafeMatcher.matchesSafely.

Subclasses should implement this.
Inherited from org.hamcrest.TypeSafeMatcher:
describeMismatchmatches

Field Detail

stringback to summary
private final String string

Constructor Detail

IsEqualIgnoringCaseback to summary
public IsEqualIgnoringCase(String string)

Method Detail

describeMismatchSafelyback to summary
public void describeMismatchSafely(String item, Description mismatchDescription)

Overrides org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Doc from org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Subclasses should override this. The item will already have been checked for the specific type and will never be null.

Annotations
@Override
describeToback to summary
public void describeTo(Description description)

Implements org.hamcrest.SelfDescribing.describeTo.

Doc from org.hamcrest.SelfDescribing.describeTo.

Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.

Parameters
description:Description

The description to be built or appended to.

Annotations
@Override
equalToIgnoringCaseback to summary
public static Matcher<String> equalToIgnoringCase(String expectedString)

Creates a matcher of String that matches when the examined string is equal to the specified expectedString, ignoring case. For example:

assertThat("Foo", equalToIgnoringCase("FOO"))
Parameters
expectedString:String

the expected value of matched strings

matchesSafelyback to summary
public boolean matchesSafely(String item)

Implements abstract org.hamcrest.TypeSafeMatcher.matchesSafely.

Doc from org.hamcrest.TypeSafeMatcher.matchesSafely.

Subclasses should implement this. The item will already have been checked for the specific type and will never be null.

Annotations
@Override