Example usage for com.google.common.truth Correspondence Correspondence

List of usage examples for com.google.common.truth Correspondence Correspondence

Introduction

In this page you can find the example usage for com.google.common.truth Correspondence Correspondence.

Prototype

@Deprecated
Correspondence() 

Source Link

Document

Constructor.

Usage

From source file:com.google.javascript.jscomp.testing.JSCompCorrespondences.java

private static final <A, E> Correspondence<A, E> transforming(Function<? super A, ? extends E> transformation,
        String description) {//  w  w w  .  j  a v  a2  s .co m
    return new Correspondence<A, E>() {
        @Override
        public boolean compare(A actual, E expected) {
            return transformation.apply(actual).equals(expected);
        }

        @Override
        public String toString() {
            return description;
        }
    };
}