This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppActivityMapper implements ActivityMapper { | |
@Override | |
public Activity getActivity(Place place) { | |
activity = null; | |
if (place instanceof StartPlace) { | |
return new StartActivity(); | |
} else if (place instanceof SearchPlace) { | |
return new SearchActivity(); | |
} else if (place instanceof CustomerPlace) { | |
return new CustomerActivity(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AnyAsyncCallback<T> extends ArgumentMatcher<AsyncCallback<T>> { | |
public AnyAsyncCallback() { | |
} | |
@Override | |
public boolean matches(Object argument) { | |
return argument instanceof AsyncCallback; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FakeEventBinderProvider implements FakeProvider<EventBinder<?>> { | |
@Override | |
public EventBinder<?> getFake(Class<?> type) { | |
return (EventBinder<?>) Proxy.newProxyInstance(FakeEventBinderProvider.class.getClassLoader(), new Class<?>[] { type }, new InvocationHandler() { | |
@Override | |
public Object invoke(Object proxy, Method method, final Object[] args) throws Throwable { | |
String methodName = method.getName(); | |
assert methodName.equals("bindEventHandlers"); | |
final List<HandlerRegistration> registrations = new LinkedList<HandlerRegistration>(); |