public void GetTabIndexForGoToTabCommandTest() { string command = "go to tab one"; // TODO: Initialize to an appropriate value string expected = "1"; // TODO: Initialize to an appropriate value string actual; actual = CommandParametersManager.GetTabIndexForGoToTabCommand(command); Assert.AreEqual(expected, actual); }
/// <summary> /// This method will return the command type with/without parameters to be executed /// </summary> /// <param name="commandTypes"></param> /// <param name="command"></param> /// <returns></returns> private static Dictionary <CommandType, object> GetCommandDetails(IReadOnlyCollection <CommandType> commandTypes, string command) { try { var resultDictionary = new Dictionary <CommandType, object>(); if (commandTypes == null) { return(null); } if (commandTypes.Count == 1) { var commandType = commandTypes.FirstOrDefault(); switch (commandType) { case CommandType.go: { resultDictionary.Add(commandType, CommandParametersManager.GetWebsiteNameForGoCommand(command.Split(' ').ToList())); break; } case CommandType.go_to_tab: { resultDictionary.Add(commandType, CommandParametersManager.GetTabIndexForGoToTabCommand(command)); break; } case CommandType.move: { resultDictionary.Add(commandType, CommandParametersManager.GetxyValuesToMouseMoveCommand(command)); break; } default: { resultDictionary.Add(commandType, ""); break; } } } return(resultDictionary); } catch (Exception ex) { Log.ErrorLog(ex); throw; } }