示例#1
0
文件: Program.cs 项目: agni90/kottans
        public static void Main(string[] args)
        {
            Console.WriteLine("Hi, welcome to my test task.\nPlease, input commands, that contains multiple words in quote marks\nExample: \" -print test\"");
            var checker = new Checkers();
            var inputParams = args;
            while (true)
            {
                for (int i = 0; i < inputParams.Length; i++)
                {
                    bool isChecked = false;
                    if (inputParams[i].Equals("-quit"))
                    {
                        Console.WriteLine("Goodbye");
                        return;
                    }
                    isChecked = checker.CheckForPrint(inputParams[i]) ? true : false;
                    isChecked = isChecked || checker.CheckForHelp(inputParams[i]) ? true : false;
                    isChecked = isChecked || checker.CheckForK(inputParams[i]) ? true : false;
                    isChecked = isChecked || checker.CheckForPing(inputParams[i]) ? true : false;
                    isChecked = isChecked || checker.CheckIsCommandCorrect(inputParams[i]) ? true : false;

                }

                //the next line splits string to array
                inputParams = Console.ReadLine().SplitInputValue();
            }
        }
示例#2
0
 public static void Init(TestContext tc)
 {
     classUnderTest = new Checkers();
 }