public void Execute_NoArgs_PerformWindowMaximize() { // Arrange var webDriver = Substitute.For <IWebDriver>(); var options = Substitute.For <IOptions>(); var window = Substitute.For <IWindow>(); webDriver.Manage().Returns(options); options.Window.Returns(window); // Act IgnoreExceptions.Run(() => _defaultCommand.Execute(webDriver)); // Assert window.Received().Maximize(); }
void Handle_Clicked(object sender, System.EventArgs e) { if (sender == btnMute) { } else if (sender == btnPlay) { if (Player == null) { return; } switch (Player.Status) { case VideoStatus.NotReady: break; case VideoStatus.Playing: Player.Stop(); break; case VideoStatus.Stoped: Player.Play(); break; } } else if (sender == btnChangeView) { //todo } else if (sender == btnFullScreen) { if (MaximizeCommand == null) { return; } MaximizeCommand.Execute(MaximizeCommandParameter); } else if (sender == btnShowVideoLevelPopup) { ShowPopup(); } }