コード例 #1
0
        public void TestDisplayApplicationCallsDisplay()
        {
            var windowMock = Substitute.For <IBrowserWindow>();

            _browserWindowsManager.GetOrCreateBrowserWindow(null).ReturnsForAnyArgs(windowMock);
            _browsersManagerApi.DisplayApplication(new Application());
            windowMock.Received().Display();
        }
コード例 #2
0
        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>());
        }