public void ChromeOptions_add_five_extensions() { string[] expected = { "SePSX.dll", "SePSX.dll", "SePSX.dll", "SePSX.dll", "SePSX.dll" }; AddSeChromeExtensionCommand cmdlet = //new AddSeChromeExtensionCommandTestFixture(); WebDriverFactory.Container.Resolve <AddSeChromeExtensionCommand>(); //AddSeChromeExtensionCommand.UnitTestMode = true; cmdlet.InputObject = //WebDriverFactory.GetChromeOptions(); // resolve ChromeOptions WebDriverFactory.Container.Resolve <ChromeOptions>(); cmdlet.ExtensionList = expected; SeAddChromeExtensionCommand command = new SeAddChromeExtensionCommand(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).Extensions); Assert.AreEqual( expectedList, ((ChromeOptions)(object)PSTestLib.UnitTestOutput.LastOutput[0]).Extensions); }
protected override void ProcessRecord() { // check input options this.checkInputChromeOptions(true); // add an extension SeAddChromeExtensionCommand command = new SeAddChromeExtensionCommand(this); command.Execute(); }
protected override void ProcessRecord() { // check input options CheckInputChromeOptions(true); // add an extension var command = new SeAddChromeExtensionCommand(this); command.Execute(); }