Skip to content

Instantly share code, notes, and snippets.

@nbuesing
Last active December 26, 2015 04:08
Show Gist options
  • Select an option

  • Save nbuesing/7090461 to your computer and use it in GitHub Desktop.

Select an option

Save nbuesing/7090461 to your computer and use it in GitHub Desktop.
private SampleWidget sampleWidget; // do not initialize here, but at the end of the setUp() method...
private SimpleEventBus = new SimpleEventBus();
@Before
public void setUp() {
GwtMockito.useProviderForType(SimpleEventBus.class, new FakeProvider() {
@Override
public Object getFake(Class aClass) {
return simpleEventBus;
}
});
sampleWidget = new SampleWidget();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment