Interface AssertOnValueEquality<T extends AssertOnValueEquality<T>>

Type Parameters:
T - The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
All Known Implementing Classes:
AbstractAssertWithValues, AbstractColumnValueAssert, AbstractRowValueAssert, AbstractValueAssert, ChangeColumnValueAssert, ChangeRowValueAssert, RequestColumnValueAssert, RequestRowValueAssert, TableColumnValueAssert, TableRowValueAssert

public interface AssertOnValueEquality<T extends AssertOnValueEquality<T>>
Defines the assertion methods on the equality of a value.
Author:
Régis Pouiller, Otoniel Isidoro
  • Method Summary

    Modifier and Type
    Method
    Description
    isEqualTo(byte[] expected)
    Verifies that the value is equal to a array of bytes.
    isEqualTo(Boolean expected)
    Verifies that the value is equal to a boolean.
    isEqualTo(Character expected)
    Verifies that the value is equal to a character.
    isEqualTo(Number expected)
    Verifies that the value is equal to a number.
    isEqualTo(Object expected)
    Verifies that the value is equal to a boolean.
    isEqualTo(String expected)
    Verifies that the value is equal to a text.
    isEqualTo(LocalDate expected)
    Verifies that the value is equal to a date value.
    Verifies that the value is equal to a date/time value.
    isEqualTo(LocalTime expected)
    Verifies that the value is equal to a time value.
    isEqualTo(UUID expected)
    Verifies that the value is equal to an UUID.
    Verifies that the value is equal to a date/time value.
    isEqualTo(DateValue expected)
    Verifies that the value is equal to a date value.
    isEqualTo(TimeValue expected)
    Verifies that the value is equal to a time value.
    Verifies that the value is equal to false boolean.
    Verifies that the value is equal to true boolean.
    Verifies that the value is equal to zero.
  • Method Details

    • isEqualTo

      T isEqualTo(Object expected)
      Verifies that the value is equal to a boolean.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to french Locale :

       
       assertThat(table).row().value().isEqualTo(Locale.FRENCH);
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to french Locale :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(Locale.FRENCH);
       
       
      Parameters:
      expected - The expected object value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the object in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(Boolean expected)
      Verifies that the value is equal to a boolean.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to true boolean :

       
       assertThat(table).row().value().isEqualTo(true);
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to true boolean :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(true);
       
       
      Parameters:
      expected - The expected boolean value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the boolean in parameter.
      See Also:
    • isTrue

      T isTrue()
      Verifies that the value is equal to true boolean.

      Example with the value in the first Column of the first Row of the Table :

       
       assertThat(table).row().value().isTrue();
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change :

       
       assertThat(changes).change().rowAtEndPoint().value().isTrue();
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to true boolean.
      See Also:
    • isFalse

      T isFalse()
      Verifies that the value is equal to false boolean.

      Example with the value in the first Column of the first Row of the Table :

       
       assertThat(table).row().value().isFalse();
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change :

       
       assertThat(changes).change().rowAtEndPoint().value().isFalse();
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to false boolean.
      See Also:
    • isEqualTo

      T isEqualTo(Number expected)
      Verifies that the value is equal to a number.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to number 3 :

       
       assertThat(table).row().value().isEqualTo(3);
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to number 3 :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(3);
       
       
      Parameters:
      expected - The expected number value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the number in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(byte[] expected)
      Verifies that the value is equal to a array of bytes.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a array of bytes loaded from a file in the classpath :

       
       byte[] bytes = bytesContentFromClassPathOf("file.png");
       assertThat(table).row().value().isEqualTo(bytes);
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a array of bytes loaded from a file in the classpath :

       
       byte[] bytes = bytesContentFromClassPathOf("file.png");
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(bytes);
       
       
      Parameters:
      expected - The expected array of bytes value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the array of bytes in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(String expected)
      Verifies that the value is equal to a text.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a text :

       
       assertThat(table).row().value().isEqualTo("text");
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a text :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo("text");
       
       
      Parameters:
      expected - The expected text value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the text in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(Character expected)
      Verifies that the value is equal to a character.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a character :

       
       assertThat(table).row().value().isEqualTo('c');
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a character :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo('c');
       
       
      Parameters:
      expected - The expected character value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the character in parameter.
      Since:
      1.2.0
      See Also:
    • isEqualTo

      T isEqualTo(UUID expected)
      Verifies that the value is equal to an UUID.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to an UUID :

       
       assertThat(table).row().value().isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"));
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to an UUID :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"));
       
       
      Parameters:
      expected - The expected UUID value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the UUID in parameter.
      Since:
      1.1.0
      See Also:
    • isEqualTo

      T isEqualTo(DateValue expected)
      Verifies that the value is equal to a date value.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a date value :

       
       assertThat(table).row().value().isEqualTo(DateValue.of(2014, 7, 7));
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a date value :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(DateValue.of(2014, 7, 7));
       
       
      Parameters:
      expected - The expected date value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the date value in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(TimeValue expected)
      Verifies that the value is equal to a time value.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a time value :

       
       assertThat(table).row().value().isEqualTo(TimeValue.of(21, 29, 30));
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a time value :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(TimeValue.of(21, 29, 30));
       
       
      Parameters:
      expected - The expected time value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the time value in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(DateTimeValue expected)
      Verifies that the value is equal to a date/time value.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a date/time value :

       
       assertThat(table).row().value().isEqualTo(DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(21, 29)));
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a date/time value :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(DateTimeValue.of(DateValue.of(2014, 7, 7), TimeValue.of(21, 29)));
       
       
      Parameters:
      expected - The expected date/time value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the date/time value in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(LocalDate expected)
      Verifies that the value is equal to a date value.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a date value :

       
       assertThat(table).row().value().isEqualTo(LocalDate.of(2014, 7, 7));
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a date value :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(LocalDate.of(2014, 7, 7));
       
       
      Parameters:
      expected - The expected date value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the date value in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(LocalTime expected)
      Verifies that the value is equal to a time value.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a time value :

       
       assertThat(table).row().value().isEqualTo(LocalTime.of(21, 29, 30));
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a time value :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(LocalTime.of(21, 29, 30));
       
       
      Parameters:
      expected - The expected time value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the time value in parameter.
      See Also:
    • isEqualTo

      T isEqualTo(LocalDateTime expected)
      Verifies that the value is equal to a date/time value.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to a date/time value :

       
       assertThat(table).row().value().isEqualTo(LocalDateTime.of(2014, 7, 7, 21, 29));
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to a date/time value :

       
       assertThat(changes).change().rowAtEndPoint().value().isEqualTo(LocalDateTime.of(2014, 7, 7, 21, 29));
       
       
      Parameters:
      expected - The expected date/time value.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to the date/time value in parameter.
      See Also:
    • isZero

      T isZero()
      Verifies that the value is equal to zero.

      Example where the assertion verifies that the value in the first Column of the first Row of the Table is equal to zero :

       
       assertThat(table).row().value().isZero();
       
       

      Example where the assertion verifies that the value in the first Column of the Row at end point of the first Change is equal to zero :

       
       assertThat(changes).change().rowAtEndPoint().value().isZero();
       
       
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the value is not equal to zero.
      See Also: