Interface PlaceholderHandler

All Known Implementing Classes:
IgnorePlaceholderHandler, IsDateTimePlaceholderHandler, IsNumberPlaceholderHandler, MatchesRegexPlaceholderHandler

public interface PlaceholderHandler
Interface implemented by classes that are responsible for a placeholder keyword.

This class and the whole module are considered experimental and any API may change between releases of XMLUnit.

Implementations are expected to be thread-safe, the evaluate(java.lang.String, java.lang.String...) method may be invoked by multiple threads in parallel.

Since:
2.7.0
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(String testText, String... placeholderParameters)
    Evaluate the test value when control contained the placeholder handled by this class.
    The placeholder keyword this handler is responsible for.
  • Method Details

    • getKeyword

      String getKeyword()
      The placeholder keyword this handler is responsible for.
      Returns:
      placeholder keyword this handler is responsible for
    • evaluate

      ComparisonResult evaluate(String testText, String... placeholderParameters)
      Evaluate the test value when control contained the placeholder handled by this class.
      Parameters:
      testText - the textual content of the element or attribute this placeholder has been added to.
      placeholderParameters - any arguments provided to the placeholder.
      Returns:
      the comparison outcome