Interface ValueComparer

All Known Implementing Classes:
ConditionalSelectorMultiValueComparer, ConditionalSetBiValueComparer, IsActualContainingExpectedStringValueComparer, IsActualEqualToExpectedValueComparer, IsActualEqualToExpectedWithEmptyFailMessageValueComparer, IsActualGreaterThanExpectedValueComparer, IsActualGreaterThanExpectedWithIgnoreMillisValueComparer, IsActualGreaterThanOrEqualToExpectedValueComparer, IsActualGreaterThanOrEqualToExpectedWithIgnoreMillisValueComparer, IsActualLessThanExpectedValueComparer, IsActualLessThanOrEqualToExpectedValueComparer, IsActualNotEqualToExpectedValueComparer, IsActualNotNullValueComparer, IsActualNullValueComparer, IsActualWithinToleranceOfExpectedTimestampValueComparer, NeverFailsValueComparer, TimestampIgnoreMillisValueComparerBase, ValueComparerBase, ValueComparerTemplateBase
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ValueComparer
Strategy for comparing values.
Since:
2.6.0
Author:
Jeff Jensen
  • Method Summary

    Modifier and Type
    Method
    Description
    compare(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue)
    Compare expected and actual values.
  • Method Details

    • compare

      String compare(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue) throws DatabaseUnitException
      Compare expected and actual values.
      Parameters:
      expectedTable - Table containing all expected results.
      actualTable - Table containing all actual results.
      rowNum - The current row number comparing.
      columnName - The name of the current column comparing.
      dataType - The DataType for the current column comparing. Use DataType.compare(Object, Object) for equal, not equal, less than, and greater than comparisons.
      expectedValue - The current expected value for the column.
      actualValue - The current actual value for the column.
      Returns:
      compare failure message or null if successful compare.
      Throws:
      DatabaseUnitException