use of com.vaadin.flow.internal.BrowserLiveReloadAccessor in project flow by vaadin.
the class PushHandlerTest method mockBrowserLiveReloadImpl.
public static BrowserLiveReload mockBrowserLiveReloadImpl(VaadinContext context) {
BrowserLiveReload liveReload = Mockito.mock(BrowserLiveReload.class);
Lookup lookup = Lookup.of(new BrowserLiveReloadAccessor() {
@Override
public BrowserLiveReload getLiveReload(VaadinContext context) {
return liveReload;
}
}, BrowserLiveReloadAccessor.class);
context.setAttribute(Lookup.class, lookup);
return liveReload;
}
Aggregations