Class Adapter

java.lang.Object
org.testfx.assertions.impl.Adapter

public class Adapter extends Object
Provides static utility methods for converting a hamcrest matcher to an AssertJ condition. We use this internally in the implementation of AssertJ assertions.

This class is not part of the TestFX API and is not expected to be useful outside of our specific context.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static <T> org.assertj.core.api.Condition<? super T>
    adaptMatcher(org.hamcrest.Matcher<? extends T> matcher, boolean invert)
     
    static <T> org.assertj.core.api.Condition<? super T>
    fromInverseMatcher(org.hamcrest.Matcher<? extends T> matcher)
     
    static <T> org.assertj.core.api.Condition<? super T>
    fromMatcher(org.hamcrest.Matcher<? extends T> matcher)
     
    private static <T> String
    getActual(org.hamcrest.Matcher<? extends T> matcher, T actual)
     
    private static <T> String
    getErrorMessage(org.hamcrest.Matcher<? extends T> matcher, T actual, boolean invert)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Adapter

      public Adapter()
  • Method Details

    • fromInverseMatcher

      public static <T> org.assertj.core.api.Condition<? super T> fromInverseMatcher(org.hamcrest.Matcher<? extends T> matcher)
    • fromMatcher

      public static <T> org.assertj.core.api.Condition<? super T> fromMatcher(org.hamcrest.Matcher<? extends T> matcher)
    • adaptMatcher

      private static <T> org.assertj.core.api.Condition<? super T> adaptMatcher(org.hamcrest.Matcher<? extends T> matcher, boolean invert)
    • getErrorMessage

      private static <T> String getErrorMessage(org.hamcrest.Matcher<? extends T> matcher, T actual, boolean invert)
    • getActual

      private static <T> String getActual(org.hamcrest.Matcher<? extends T> matcher, T actual)