public void TestDisplayApplicationCallsDisplay() { var windowMock = Substitute.For <IBrowserWindow>(); _browserWindowsManager.GetOrCreateBrowserWindow(null).ReturnsForAnyArgs(windowMock); _browsersManagerApi.DisplayApplication(new Application()); windowMock.Received().Display(); }
public void TestDisplayApplicationCallGetOrCreateBrowserWindow() { _uiHelper = Substitute.For <IUiHelper>(); var windowMock = Substitute.For <IBrowserWindow>(); _browserWindowsManager.GetOrCreateBrowserWindow(null).ReturnsForAnyArgs(windowMock); _browsersManagerApi = new BrowsersManagerApi(_browserWindowsManager, _uiHelper); _browsersManagerApi.DisplayApplication(new Application()); _browserWindowsManager.Received().GetOrCreateBrowserWindow(Arg.Any <IApplication>()); }