Interface Tester<T>

Type Parameters:
T - test subject type
All Superinterfaces:
Consumer<T>

public interface Tester<T> extends Consumer<T>
Test interface for marshalling validation.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    reject(T value)
    Validates that the specified value is rejected by the tester.
    <E extends Throwable>
    void
    reject(T value, Class<E> expected)
    Validates that an attempt to marshal the specified value throws the specified exception type.

    Methods inherited from interface java.util.function.Consumer

    accept, andThen
  • Method Details

    • reject

      void reject(T value)
      Validates that the specified value is rejected by the tester.
      Parameters:
      value - an unmarshallable value
    • reject

      <E extends Throwable> void reject(T value, Class<E> expected)
      Validates that an attempt to marshal the specified value throws the specified exception type.
      Type Parameters:
      E - the expected exception type
      Parameters:
      value - an unmarshallable value
      expected - the expected exception type