Example usage for com.google.gwt.core.shared GWTBridge create

List of usage examples for com.google.gwt.core.shared GWTBridge create

Introduction

In this page you can find the example usage for com.google.gwt.core.shared GWTBridge create.

Prototype

public abstract <T> T create(Class<?> classLiteral);

Source Link

Usage

From source file:net.paslavsky.gwt.appload.client.internal.AccessToTheApiSteps.java

License:Apache License

@Before
public void setUp() throws Exception {
    GWTBridge mock = Mockito.mock(GWTBridge.class);
    Mockito.when(mock.create(GwtApplicationLoader.class)).then(new Answer<GwtApplicationLoader>() {
        @Override//from w  w w .  j a va2s. c  o m
        public GwtApplicationLoader answer(InvocationOnMock invocation) throws Throwable {
            // Lets create proxy object every time
            return new GwtApplicationLoaderProxy();
        }
    });
    GWT.setBridge(mock);
}