public void ChromeOptions_add_binary_location_second() { string expected = "path2"; SetSeChromeBinaryCommand cmdlet = //new SetSeChromeBinaryCommandTestFixture(); WebDriverFactory.Container.Resolve<SetSeChromeBinaryCommand>(); //SetSeChromeBinaryCommand.UnitTestMode = true; ((EditChromeOptionsCmdletBase)cmdlet).InputObject = //WebDriverFactory.GetChromeOptions(); // resolve ChromeOptions WebDriverFactory.Container.Resolve<ChromeOptions>(); cmdlet.BinaryPath = "path1"; SeSetChromeBinaryCommand command = new SeSetChromeBinaryCommand(cmdlet); command.Execute(); //SePSX.CommonCmdletBase.UnitTestOutput.Clear(); PSTestLib.UnitTestOutput.Clear(); cmdlet.BinaryPath = expected; SeSetChromeBinaryCommand command2 = new SeSetChromeBinaryCommand(cmdlet); command2.Execute(); //Assert.AreEqual(expected, (SePSX.CommonCmdletBase.UnitTestOutput[0] as ChromeOptions).BinaryLocation); Assert.AreEqual( expected, ((ChromeOptions)(object)PSTestLib.UnitTestOutput.LastOutput[0]).BinaryLocation); }
protected override void ProcessRecord() { // check input options CheckInputChromeOptions(true); // set the binary path var command = new SeSetChromeBinaryCommand(this); command.Execute(); }