Class ScalarIsCloseTo<S>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeMatcher<S>
-
- org.tensorics.core.testing.hamcrest.ScalarIsCloseTo<S>
-
- Type Parameters:
S
- the type of the scalars (elements of the field)
- All Implemented Interfaces:
org.hamcrest.Matcher<S>
,org.hamcrest.SelfDescribing
public class ScalarIsCloseTo<S> extends org.hamcrest.TypeSafeMatcher<S>
A matcher for base tests, that allows to set a tolerance value. This matcher uses the scalar support of tensorics, thus it can be used on any scalars fro which a field is provided.
-
-
Constructor Summary
Constructors Constructor Description ScalarIsCloseTo(ScalarSupport<S> scalarSupport, S value, S tolerance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeTo(org.hamcrest.Description description)
protected boolean
matchesSafely(S valueToAssert)
-
Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, matches
-
-
-
-
Constructor Detail
-
ScalarIsCloseTo
public ScalarIsCloseTo(ScalarSupport<S> scalarSupport, S value, S tolerance)
-
-