public void ChromeOptions_add_five_arguments() { string[] expected = { "test1", "test2", "test3", "test4", "test5" }; AddSeChromeArgumentCommand cmdlet = //new AddSeChromeArgumentCommandTestFixture(); WebDriverFactory.Container.Resolve <AddSeChromeArgumentCommand>(); //AddSeChromeArgumentCommand.UnitTestMode = true; cmdlet.InputObject = //WebDriverFactory.GetChromeOptions(); // resolve ChromeOptions WebDriverFactory.Container.Resolve <ChromeOptions>(); cmdlet.ArgumentList = expected; SeAddChromeArgumentCommand command = new SeAddChromeArgumentCommand(cmdlet); command.Execute(); System.Collections.Generic.List <string> listOfArguments = new System.Collections.Generic.List <string>(); listOfArguments.Add(expected[0]); listOfArguments.Add(expected[1]); listOfArguments.Add(expected[2]); listOfArguments.Add(expected[3]); listOfArguments.Add(expected[4]); ReadOnlyCollection <string> expectedList = new ReadOnlyCollection <string>(listOfArguments); //Assert.AreEqual(expectedList, (SePSX.CommonCmdletBase.UnitTestOutput[0] as ChromeOptions).Arguments); Assert.AreEqual( expectedList, ((ChromeOptions)(object)PSTestLib.UnitTestOutput.LastOutput[0]).Arguments); }
protected override void ProcessRecord() { // check input options CheckInputChromeOptions(true); // add an option var command = new SeAddChromeArgumentCommand(this); command.Execute(); }