, , . , , Java .
L, , is. :
assertThat(longValue, greaterThan(1));
assertThat(longList, contains(1, 2, 3));
:
public static Matcher<Long> is(Integer value) {
return org.hamcrest.core.Is.is(value.longValue());
}
, , int long, float double:
public static Matcher<Long> is(Float value) {
return org.hamcrest.core.Is.is(value.longValue());
}
public static Matcher<Long> is(Double value) {
return org.hamcrest.core.Is.is(value.longValue());
}
Java byte Integer *, byte short. , , int double?
public static Matcher<Double> is(Integer value) {
return org.hamcrest.core.Is.is(value.doubleValue());
}
: (Integer)
, ! , Java . , .
, , , Hamcrest , . , , 1L 1.0 .
* byte int, Integer.