@SuppressWarnings("rawtypes") public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Table.class, new Function<Table, Table>() { @Override public Table apply(Table delegate) { return wrap(delegate); } }); }
@SuppressWarnings("rawtypes") public void testForwarding() { new ForwardingWrapperTester() .testForwarding( ListMultimap.class, new Function<ListMultimap, ListMultimap>() { @Override public ListMultimap apply(ListMultimap delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Set.class, new Function<Set, Set>() { @Override public Set apply(Set delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( SortedMultiset.class, new Function<SortedMultiset, SortedMultiset>() { @Override public SortedMultiset apply(SortedMultiset delegate) { return wrap(delegate); } }); }
@SuppressWarnings("rawtypes") public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Deque.class, new Function<Deque, Deque>() { @Override public Deque apply(Deque delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( List.class, new Function<List, List>() { @Override public List apply(List delegate) { return wrap(delegate); } }); }
@SuppressWarnings("rawtypes") public void testForwarding() { new ForwardingWrapperTester() .testForwarding( SortedSetMultimap.class, new Function<SortedSetMultimap, SortedSetMultimap>() { @Override public SortedSetMultimap apply(SortedSetMultimap delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( SortedMap.class, new Function<SortedMap, SortedMap>() { @Override public SortedMap apply(SortedMap delegate) { return wrap(delegate); } }); }
@SuppressWarnings("rawtypes") public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Multimap.class, new Function<Multimap, Multimap>() { @Override public Multimap apply(Multimap delegate) { return wrap(delegate); } }); }
public void testCovariantReturn() { new ForwardingWrapperTester() .testForwarding( Sub.class, new Function<Sub, Sub>() { @Override public Sub apply(Sub sub) { return new ForwardingSub(sub); } }); }
@SuppressWarnings("rawtypes") public void testForwarding() { new ForwardingWrapperTester() .testForwarding( ListIterator.class, new Function<ListIterator, ListIterator>() { @Override public ListIterator apply(ListIterator delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Multiset.class, new Function<Multiset, Multiset>() { @Override public Multiset apply(Multiset delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Queue.class, new Function<Queue, Queue>() { @Override public Queue apply(Queue delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Collection.class, new Function<Collection, Collection>() { @Override public Collection apply(Collection delegate) { return wrap(delegate); } }); }
@SuppressWarnings("rawtypes") public void testForwarding() { new ForwardingWrapperTester() .testForwarding( SetMultimap.class, new Function<SetMultimap, SetMultimap>() { @Override public SetMultimap apply(SetMultimap delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( NavigableSet.class, new Function<NavigableSet, NavigableSet>() { @Override public NavigableSet apply(NavigableSet delegate) { return wrap(delegate); } }); }
@SuppressWarnings({"rawtypes", "unchecked"}) public void testForwarding() { new ForwardingWrapperTester() .testForwarding( Map.class, new Function<Map, Map>() { @Override public Map apply(Map delegate) { return wrap(delegate); } }); }
public void testNotInterfaceType() { try { new ForwardingWrapperTester().testForwarding(String.class, Functions.<String>identity()); fail(); } catch (IllegalArgumentException expected) { } }
public void testNulls() { new NullPointerTester() .setDefault(Class.class, Runnable.class) .testAllPublicInstanceMethods(new ForwardingWrapperTester()); }
public void testExplicitEqualsAndHashCodeDelegatedWhenExplicitlyAsked() { try { new ForwardingWrapperTester() .includingEquals() .testForwarding(Equals.class, NoDelegateToEquals.WRAPPER); } catch (AssertionFailedError expected) { return; } fail("Should have failed"); }