Constructor and Description |
---|
ColorFixture(Color target)
Creates a new
ColorFixture . |
ColorFixture(Color target,
org.fest.assertions.Description description)
Creates a new
ColorFixture . |
ColorFixture(Color target,
String description)
Creates a new
ColorFixture . |
Modifier and Type | Method and Description |
---|---|
String |
description()
Returns this fixture's description.
|
ColorFixture |
requireEqualTo(Color color)
Verifies that this fixture's
Color is equal to the given one. |
ColorFixture |
requireEqualTo(String hexValue)
Verifies that this fixture's
Color is equal to the given color represented by the given hexadecimal
value (e.g. |
ColorFixture |
requireNotEqualTo(Color color)
Verifies that this fixture's
Color is not equal to the given one. |
ColorFixture |
requireNotEqualTo(String hexValue)
Verifies that this fixture's
Color is not equal to the given color represented by the given
hexadecimal value (e.g. |
Color |
target()
Returns this fixture's color.
|
public ColorFixture(Color target)
ColorFixture
.target
- the color to manage.NullPointerException
- if target
is null
.public ColorFixture(Color target, String description)
ColorFixture
.target
- the color to manage.description
- this fixture's description.NullPointerException
- if target
is null
.public ColorFixture(Color target, org.fest.assertions.Description description)
ColorFixture
.target
- the color to manage.description
- this fixture's description.NullPointerException
- if target
is null
.public ColorFixture requireEqualTo(String hexValue)
Color
is equal to the given color represented by the given hexadecimal
value (e.g. "82A9FF".)hexValue
- the value representing the color to compare to.NullPointerException
- if the hexadecimal code is null
.IllegalArgumentException
- if the hexadecimal code is empty.NumberFormatException
- if the hexadecimal code is empty.AssertionError
- if this fixture's Color
is not equal to the given one.public ColorFixture requireEqualTo(Color color)
Color
is equal to the given one.color
- the given Color
to compare to.AssertionError
- if this fixture's Color
is not equal to the given one.public ColorFixture requireNotEqualTo(String hexValue)
Color
is not equal to the given color represented by the given
hexadecimal value (e.g. "82A9FF".)hexValue
- the value representing the color to compare to.NullPointerException
- if the hexadecimal code is null
.IllegalArgumentException
- if the hexadecimal code is empty.NumberFormatException
- if the hexadecimal code is empty.AssertionError
- if this fixture's Color
is equal to the given one.public ColorFixture requireNotEqualTo(Color color)
Color
is not equal to the given one.color
- the given Color
to compare to.AssertionError
- if this fixture's Color
is equal to the given one.public Color target()
public final String description()
Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.