All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pivotallabs.greatexpectations.matchers.ObjectMatcher Maven / Gradle / Ivy

The newest version!
package com.pivotallabs.greatexpectations.matchers;

import com.pivotallabs.greatexpectations.AllowActualToBeNull;
import com.pivotallabs.greatexpectations.BaseMatcher;
import com.pivotallabs.greatexpectations.MatcherOf;

@MatcherOf(Object.class)
public class ObjectMatcher> extends BaseMatcher {
  public boolean toEqual(T expected) {
    return actual.equals(expected);
  }

  public boolean toBe(T expected) {
    return actual == expected;
  }

  public boolean toBeInstanceOf(Class expected) {
    return expected.isAssignableFrom(actual.getClass());
  }

  @AllowActualToBeNull
  public boolean toBeNull() {
    return actual == null;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy