Class IsActualNotNullValueComparer

All Implemented Interfaces:
ValueComparer

public class IsActualNotNullValueComparer extends ValueComparerTemplateBase
ValueComparer implementation that verifies actual value is not null. Note, ignores any expected value.
Since:
2.7.3
Author:
Jeff Jensen
  • Constructor Details

    • IsActualNotNullValueComparer

      public IsActualNotNullValueComparer()
  • Method Details

    • isExpected

      protected boolean isExpected(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue) throws DatabaseUnitException
      Description copied from class: ValueComparerTemplateBase
      Determines whether the actual value compares as expected against the expected value.
      Specified by:
      isExpected in class ValueComparerTemplateBase
      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.
      expectedValue - The current expected value for the column.
      actualValue - The current actual value for the column.
      Returns:
      true if comparing actual to expected is as expected.
      Throws:
      DatabaseUnitException - if the comparison cannot be performed.
    • makeFailMessage

      protected String makeFailMessage()
      Returns the message used when the actual value is unexpectedly null.
      Returns:
      the message used when the actual value is unexpectedly null.
    • getFailPhrase

      protected String getFailPhrase()
      Description copied from class: ValueComparerTemplateBase
      Returns the text snippet for substitution in ValueComparerBase.BASE_FAIL_MSG.
      Specified by:
      getFailPhrase in class ValueComparerTemplateBase
      Returns:
      The text snippet for substitution in ValueComparerBase.BASE_FAIL_MSG.