org.fest.assertions
Class CharAssert

java.lang.Object
  extended by org.fest.assertions.Assert
      extended by org.fest.assertions.GenericAssert<CharAssert,Character>
          extended by org.fest.assertions.CharAssert

public class CharAssert
extends GenericAssert<CharAssert,Character>

Assertions for Characters and chars.

To create a new instance of this class invoke either Assertions.assertThat(Character) or Assertions.assertThat(char).

Author:
Yvonne Wang, David DIDIER, Ansgar Konermann, Alex Ruiz

Field Summary
 
Fields inherited from class org.fest.assertions.GenericAssert
actual, myself
 
Constructor Summary
protected CharAssert(char actual)
          Creates a new CharAssert.
protected CharAssert(Character actual)
          Creates a new CharAssert.
 
Method Summary
 CharAssert isEqualTo(char expected)
          Verifies that the Character value is equal to the given one.
 CharAssert isGreaterThan(char other)
          Verifies that the Character value is greater than the given one.
 CharAssert isGreaterThanOrEqualTo(char other)
          Verifies that the Character value is greater or equal to the given one.
 CharAssert isLessThan(char other)
          Verifies that the Character value is less than the given one.
 CharAssert isLessThanOrEqualTo(char other)
          Verifies that the Character value is less or equal to the given one.
 CharAssert isLowerCase()
          Verifies that the Character value is an lower-case value.
 CharAssert isNotEqualTo(char other)
          Verifies that the Character value is not equal to the given one.
 CharAssert isUpperCase()
          Verifies that the Character value is an upper-case value.
 
Methods inherited from class org.fest.assertions.GenericAssert
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
 
Methods inherited from class org.fest.assertions.Assert
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharAssert

protected CharAssert(char actual)
Creates a new CharAssert.

Parameters:
actual - the actual value to verify.

CharAssert

protected CharAssert(Character actual)
Creates a new CharAssert.

Parameters:
actual - the actual value to verify.
Method Detail

isEqualTo

public CharAssert isEqualTo(char expected)
Verifies that the Character value is equal to the given one.

Parameters:
expected - the value to compare the actual one to.
Returns:
this assertion object.
Throws:
AssertionError - if the Character value is not equal to the given one.

isNotEqualTo

public CharAssert isNotEqualTo(char other)
Verifies that the Character value is not equal to the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the Character value is equal to the given one.

isGreaterThan

public CharAssert isGreaterThan(char other)
Verifies that the Character value is greater than the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the Character value is not greater than the given one.

isLessThan

public CharAssert isLessThan(char other)
Verifies that the Character value is less than the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the Character value is not less than the given one.

isGreaterThanOrEqualTo

public CharAssert isGreaterThanOrEqualTo(char other)
Verifies that the Character value is greater or equal to the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the Character value is not greater than or equal to the given one.

isLessThanOrEqualTo

public CharAssert isLessThanOrEqualTo(char other)
Verifies that the Character value is less or equal to the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the Character value is not less than or equal to the given one.

isUpperCase

public CharAssert isUpperCase()
Verifies that the Character value is an upper-case value.

Returns:
this assertion object.
Throws:
AssertionError - if the Character value is not an upper-case value.

isLowerCase

public CharAssert isLowerCase()
Verifies that the Character value is an lower-case value.

Returns:
this assertion object.
Throws:
AssertionError - if the Character value is not an lower-case value.


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