use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class FunctionsTest method testForMapWithDefault_null_compareWithSerializable.
// SerializableTester
@GwtIncompatible
public void testForMapWithDefault_null_compareWithSerializable() {
ImmutableMap<String, Integer> map = ImmutableMap.of("One", 1);
Function<String, Integer> function = Functions.forMap(map, null);
assertEquals((Integer) 1, function.apply("One"));
assertNull(function.apply("Two"));
// check basic sanity of equals and hashCode
new EqualsTester().addEqualityGroup(function, SerializableTester.reserialize(function)).addEqualityGroup(Functions.forMap(map, 1)).testEquals();
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class PredicatesTest method testContains_nulls.
// NullPointerTester
@GwtIncompatible
public void testContains_nulls() throws Exception {
NullPointerTester tester = new NullPointerTester();
Predicate<CharSequence> isWooPattern = Predicates.contains(Pattern.compile("Woo"));
tester.testAllPublicInstanceMethods(isWooPattern);
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class PredicatesTest method testNullPointerExceptions.
// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(Predicates.class);
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class EnumBiMapTest method testNulls.
// reflection
@GwtIncompatible
public void testNulls() {
new NullPointerTester().testAllPublicStaticMethods(EnumBiMap.class);
new NullPointerTester().testAllPublicInstanceMethods(EnumBiMap.create(ImmutableMap.of(Currency.DOLLAR, Country.CHILE)));
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class Collections2Test method testNullPointerExceptions.
// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(Collections2.class);
}
Aggregations