|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.assertions.Assert
org.fest.assertions.GenericAssert<T>
org.fest.assertions.GroupAssert<T>
org.fest.assertions.ArrayAssert<float[]>
org.fest.assertions.FloatArrayAssert
public class FloatArrayAssert
Understands assertion methods for float arrays. To create a new instance of this class use the
method .
Assertions.assertThat(float[])
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.GenericAssert |
|---|
actual |
| Constructor Summary | |
|---|---|
protected |
FloatArrayAssert(float... actual)
Creates a new FloatArrayAssert. |
| Method Summary | |
|---|---|
FloatArrayAssert |
as(Description description)
Sets the description of the actual value, to be used in as message of any
thrown when an assertion fails. |
FloatArrayAssert |
as(String description)
Sets the description of the actual value, to be used in as message of any
thrown when an assertion fails. |
FloatArrayAssert |
contains(float... values)
Verifies that the actual float array contains the given values. |
FloatArrayAssert |
containsOnly(float... values)
Verifies that the actual float array contains the given values only. |
FloatArrayAssert |
describedAs(Description description)
Alias for , since "as" is a keyword in
Groovy. |
FloatArrayAssert |
describedAs(String description)
Alias for , since "as" is a keyword in
Groovy. |
FloatArrayAssert |
doesNotSatisfy(Condition<float[]> condition)
Verifies that the actual float array does not satisfy the given condition. |
FloatArrayAssert |
excludes(float... values)
Verifies that the actual float array does not contain the given values. |
FloatArrayAssert |
hasSize(int expected)
Verifies that the number of elements in the actual float array is equal to the given one. |
FloatArrayAssert |
is(Condition<float[]> condition)
Alias for . |
FloatArrayAssert |
isEqualTo(float[] expected)
Verifies that the actual float array is equal to the given array. |
FloatArrayAssert |
isNot(Condition<float[]> condition)
Alias for . |
FloatArrayAssert |
isNotEmpty()
Verifies that the actual float array contains at least on element. |
FloatArrayAssert |
isNotEqualTo(float[] array)
Verifies that the actual float array is not equal to the given array. |
FloatArrayAssert |
isNotNull()
Verifies that the actual float array is not null. |
FloatArrayAssert |
isNotSameAs(float[] expected)
Verifies that the actual float array is not the same as the given array. |
FloatArrayAssert |
isSameAs(float[] expected)
Verifies that the actual float array is the same as the given array. |
FloatArrayAssert |
overridingErrorMessage(String message)
Replaces the default message displayed in case of a failure with the given one. |
FloatArrayAssert |
satisfies(Condition<float[]> condition)
Verifies that the actual float array satisfies the given condition. |
| Methods inherited from class org.fest.assertions.ArrayAssert |
|---|
actualGroupSize, actualInBrackets, assertContains, assertContainsOnly, assertExcludes, assertThatActualHasSize, assertThatActualIsNotEmpty, assertThatActualIsNotNull, isEmpty, isNullOrEmpty |
| Methods inherited from class org.fest.assertions.GenericAssert |
|---|
assertDoesNotSatisfy, assertEqualTo, assertIs, assertIsNot, assertNotEqualTo, assertNotNull, assertNotSameAs, assertSameAs, assertSatisfies, isNull |
| 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 |
|---|
protected FloatArrayAssert(float... actual)
FloatArrayAssert.
actual - the target to verify.| Method Detail |
|---|
public FloatArrayAssert as(String description)
AssertionError
thrown when an assertion fails. This method should be called before any assertion method, otherwise any assertion
failure will not show the provided description.
For example:
assertThat(val).as("name").isEqualTo("Frodo");
as in class GenericAssert<float[]>description - the description of the actual value.
public FloatArrayAssert describedAs(String description)
GenericAssert.as(String), since "as" is a keyword in
Groovy. This method should be called before any assertion
method, otherwise any assertion failure will not show the provided description.
For example:
assertThat(val).describedAs("name").isEqualTo("Frodo");
describedAs in class GenericAssert<float[]>description - the description of the actual value.
public FloatArrayAssert as(Description description)
AssertionError
thrown when an assertion fails. This method should be called before any assertion method, otherwise any assertion
failure will not show the provided description.
For example:
assertThat(val).as(new BasicDescription("name")).isEqualTo("Frodo");
as in class GenericAssert<float[]>description - the description of the actual value.
public FloatArrayAssert describedAs(Description description)
GenericAssert.as(Description), since "as" is a keyword in
Groovy. This method should be called before any assertion
method, otherwise any assertion failure will not show the provided description.
For example:
assertThat(val).describedAs(new BasicDescription("name")).isEqualTo("Frodo");
describedAs in class GenericAssert<float[]>description - the description of the actual value.
public FloatArrayAssert contains(float... values)
float array contains the given values.
values - the values to look for.
AssertionError - if the actual float array is null.
NullPointerException - if the given float array is null.
AssertionError - if the actual float array does not contain the given values.public FloatArrayAssert containsOnly(float... values)
float array contains the given values only.
values - the values to look for.
AssertionError - if the actual float array is null.
NullPointerException - if the given float array is null.
AssertionError - if the actual float array does not contain the given objects, or if the actual
float array contains elements other than the ones specified.public FloatArrayAssert excludes(float... values)
float array does not contain the given values.
values - the values the array should exclude.
AssertionError - if the actual float array is null.
NullPointerException - if the given float array is null.
AssertionError - if the actual Object array contains any of the given values.public FloatArrayAssert satisfies(Condition<float[]> condition)
float array satisfies the given condition.
satisfies in class GenericAssert<float[]>condition - the given condition.
NullPointerException - if the given condition is null.
AssertionError - if the actual float array does not satisfy the given condition.is(Condition)public FloatArrayAssert doesNotSatisfy(Condition<float[]> condition)
float array does not satisfy the given condition.
doesNotSatisfy in class GenericAssert<float[]>condition - the given condition.
NullPointerException - if the given condition is null.
AssertionError - if the actual float array satisfies the given condition.isNot(Condition)public FloatArrayAssert is(Condition<float[]> condition)
satisfies(Condition).
is in class GenericAssert<float[]>condition - the given condition.
NullPointerException - if the given condition is null.
AssertionError - if the actual float array does not satisfy the given condition.public FloatArrayAssert isNot(Condition<float[]> condition)
doesNotSatisfy(Condition).
isNot in class GenericAssert<float[]>condition - the given condition.
NullPointerException - if the given condition is null.
AssertionError - if the actual float array satisfies the given condition.public FloatArrayAssert isNotNull()
float array is not null.
isNotNull in class GenericAssert<float[]>AssertionError - if the actual float array is null.public FloatArrayAssert isNotEmpty()
float array contains at least on element.
isNotEmpty in class GroupAssert<float[]>AssertionError - if the actual float array is null.
AssertionError - if the actual float array is empty.public FloatArrayAssert isEqualTo(float[] expected)
float array is equal to the given array. Array equality is checked by
Arrays.equals(float[], float[]).
isEqualTo in class GenericAssert<float[]>expected - the given array to compare the actual array to.
AssertionError - if the actual float array is not equal to the given one.public FloatArrayAssert isNotEqualTo(float[] array)
float array is not equal to the given array. Array equality is checked by
Arrays.equals(float[], float[]).
isNotEqualTo in class GenericAssert<float[]>array - the given array to compare the actual array to.
AssertionError - if the actual float array is equal to the given one.public FloatArrayAssert hasSize(int expected)
float array is equal to the given one.
hasSize in class GroupAssert<float[]>expected - the expected number of elements in the actual float array.
AssertionError - if the actual float array is null.
AssertionError - if the number of elements in the actual float array is not equal to the given
one.public FloatArrayAssert isSameAs(float[] expected)
float array is the same as the given array.
isSameAs in class GenericAssert<float[]>expected - the given array to compare the actual array to.
AssertionError - if the actual float array is not the same as the given one.public FloatArrayAssert isNotSameAs(float[] expected)
float array is not the same as the given array.
isNotSameAs in class GenericAssert<float[]>expected - the given array to compare the actual array to.
AssertionError - if the actual float array is the same as the given one.public FloatArrayAssert overridingErrorMessage(String message)
For example, the following assertion:
assertThat("Hello").isEqualTo("Bye");
will fail with the default message "expected:<'[Bye]'> but was:<'[Hello]'>."
We can replace this message with our own:
assertThat("Hello").overridingErrorMessage("'Hello' should be equal to 'Bye'").isEqualTo("Bye");
in this case, the assertion will fail showing the message "'Hello' should be equal to 'Bye'".
overridingErrorMessage in class GenericAssert<float[]>message - the given error message, which will replace the default one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||