com.google.gwt.event.shared.testing.CountingEventBus is a wrapper for com.google.web.bindery.event.shared.testing.CountingEventBus. However, not all methods available in the wrapped class are available in the wrapper class. Adding those methods. (We may eventually change our code to use com.google.web.bindery classes; however, we're far away from making that change, so we still need to use this legacy class.) git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11493 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/event/shared/testing/CountingEventBus.java b/user/src/com/google/gwt/event/shared/testing/CountingEventBus.java index b0aa76b..bf102ab 100644 --- a/user/src/com/google/gwt/event/shared/testing/CountingEventBus.java +++ b/user/src/com/google/gwt/event/shared/testing/CountingEventBus.java
@@ -76,7 +76,27 @@ castFireEventFromSource(event, source); } + /** + * How many handlers are registered for the given {@code type}. + * + * @deprecated Please use {@code getHandlerCount}. + */ public int getCount(GwtEvent.Type<?> type) { return real.getCount(type); } + + /** + * How many events have fired for the given {@code type}. These events may not have been + * passed to any handlers. + */ + public int getFiredCount(Type<?> type) { + return real.getFiredCount(type); + } + + /** + * How many handlers are registered for the given {@code type}. + */ + public int getHandlerCount(Type<?> type) { + return real.getHandlerCount(type); + } }