@Test public void matchesPrimitiveValues() { ArgumentMatcher<Integer> equals = new EqualsMatcher<>(1); assertTrue(equals.matches(1)); }
@Override public boolean matches(T argument) { boolean isValueNull = value == null; boolean isArgumentNull = argument == null; return isArgumentNull && isValueNull || !isValueNull && value.equals(argument); }
EqualsMatcher implements ArgumentMatcher<T> { @Override public boolean matches(T argument) { boolean isValueNull = value == null; boolean isArgumentNull = argument == null; return isArgumentNull && isValueNull || !isValueNull && value.equals(argument); } }
EqualsMatcher implements ArgumentMatcher<T> { @Override public boolean matches(T argument) { boolean isValueNull = value == null; boolean isArgumentNull = argument == null; return isArgumentNull && isValueNull || !isValueNull && value.equals(argument); } EqualsMatcher(T value); }
EqualsMatcher implements ArgumentMatcher<T> { @Override public boolean matches(T argument) { boolean isValueNull = value == null; boolean isArgumentNull = argument == null; return isArgumentNull && isValueNull || !isValueNull && value.equals(argument); } EqualsMatcher(T value); @Override boolean matches(T argument); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
EqualsMatcher implements ArgumentMatcher<T> { @Override public boolean matches(T argument) { boolean isValueNull = value == null; boolean isArgumentNull = argument == null; return isArgumentNull && isValueNull || !isValueNull && value.equals(argument); } EqualsMatcher(T value); @Override boolean matches(T argument); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }