示例#1
0
        public static void getTestCaseResultList(JiraItem jiraItem)
        {
            Console.Write("Actual result: ");
            string tempActualResult = Console.ReadLine();

            while (tempActualResult.Length == 0)
            {
                Console.WriteLine("The field cannot be empty");
                tempActualResult = Console.ReadLine();
            }

            Console.Write("Expected result: ");
            string tempExpectedResult = Console.ReadLine();

            while (tempExpectedResult.Length == 0)
            {
                Console.WriteLine("The field cannot be epmty");
                tempExpectedResult = Console.ReadLine();
            }

            jiraItem.testCaseResultList.Add(tempActualResult + " / " + tempExpectedResult);

            char answerAnotherResults;

            do
            {
                Console.Write("Want to add more for actual result? (y/n):");
                bool isCharActual = char.TryParse(Console.ReadLine(), out answerAnotherResults);
                while ((answerAnotherResults != 'y') && (answerAnotherResults != 'n'))
                {
                    Console.Write("Type y or n: ");
                    char.TryParse(Console.ReadLine(), out answerAnotherResults);
                }
                if (answerAnotherResults == 'y')
                {
                    Console.WriteLine("another actual result: ");
                    string tempAnotherActual = Console.ReadLine();
                    while (tempAnotherActual.Length == 0)
                    {
                        Console.WriteLine("The field cannot be epmty");
                        tempAnotherActual = Console.ReadLine();
                    }

                    Console.WriteLine("another expected result: ");
                    string tempAnotherExpected = Console.ReadLine();
                    while (tempAnotherExpected.Length == 0)
                    {
                        Console.WriteLine("The field cannot be epmty");
                        tempAnotherExpected = Console.ReadLine();
                    }

                    jiraItem.testCaseResultList.Add(tempAnotherActual + " / " + tempAnotherExpected);
                }
                else
                {
                    break;
                }
            } while (answerAnotherResults == 'y');
        }
示例#2
0
 public static void getID(JiraItem jiraItem)
 {
     Console.Write("ID: "); bool isIntID = int.TryParse(Console.ReadLine(), out jiraItem.ID);
     while ((!isIntID) || (isIntID.ToString().Length == 0))
     {
         Console.WriteLine("Insert number: ");
         isIntID = int.TryParse(Console.ReadLine(), out jiraItem.ID);
     }
 }
示例#3
0
 public static void getAuthor(JiraItem jiraItem)
 {
     Console.Write("Author: "); jiraItem.author = (Console.ReadLine());
     while (jiraItem.author.Length < 1)
     {
         Console.WriteLine("The field cannot be empty");
         Console.Write("Author: "); jiraItem.author = (Console.ReadLine());
     }
 }
示例#4
0
 public static void getEnviromentAndVersion(JiraItem jiraItem)
 {
     Console.Write("Enviroment and version: "); jiraItem.enviroment = (Console.ReadLine());
     while (jiraItem.enviroment.Length < 1)
     {
         Console.WriteLine("The field cannot be empty");
         Console.Write("Enviroment and version: "); jiraItem.enviroment = (Console.ReadLine());
     }
 }
示例#5
0
 public static void getTittleDescription(JiraItem jiraItem)
 {
     Console.Write("Title/Description: "); jiraItem.title = (Console.ReadLine());
     while (jiraItem.title.Length < 1)
     {
         Console.WriteLine("The field cannot be empty");
         Console.Write("Title/Description: "); jiraItem.title = (Console.ReadLine());
     }
 }
示例#6
0
        public static void getStepsList(JiraItem jiraItem)
        {
            Console.Write("Steps details: ");
            string tempStepDetails = Console.ReadLine();

            while (tempStepDetails.Length == 0)
            {
                Console.WriteLine("The field cannot be empty");
                tempStepDetails = Console.ReadLine();
            }
            jiraItem.stepsList.Add(tempStepDetails);

            char answerAnotherSteps;

            do
            {
                Console.Write("Want to add another steps? (y/n):");
                bool isCharSteps = char.TryParse(Console.ReadLine(), out answerAnotherSteps);
                while ((answerAnotherSteps != 'y') && (answerAnotherSteps != 'n'))
                {
                    Console.Write("Type y or n: ");
                    char.TryParse(Console.ReadLine(), out answerAnotherSteps);
                }
                if (answerAnotherSteps == 'y')
                {
                    Console.WriteLine("another steps: ");
                    string tempAnotherSteps = Console.ReadLine();
                    while (tempAnotherSteps.Length == 0)
                    {
                        Console.WriteLine("The field cannot be empty");
                        tempAnotherSteps = Console.ReadLine();
                    }
                    jiraItem.stepsList.Add(tempAnotherSteps);
                }
                else
                {
                    break;
                }
            } while (answerAnotherSteps == 'y');
        }
示例#7
0
        public static void getPrerequisites(JiraItem jiraItem)
        {
            Console.Write("Prerequisites: ");
            string tempPrereq = Console.ReadLine();

            while (tempPrereq.Length == 0)
            {
                Console.WriteLine("The field cannot be empty");
                tempPrereq = Console.ReadLine();
            }

            jiraItem.prerequisitesList.Add(tempPrereq);

            char answerAnotherPrereq;

            do
            {
                Console.Write("Want to add another prerequisites (y/n)? :");
                bool isCharPrereq = char.TryParse(Console.ReadLine(), out answerAnotherPrereq);
                while ((answerAnotherPrereq != 'y') && (answerAnotherPrereq != 'n'))
                {
                    Console.Write("Type y or n: "); char.TryParse(Console.ReadLine(), out answerAnotherPrereq);
                }
                if (answerAnotherPrereq == 'y')
                {
                    Console.Write("Another prerequisites: ");
                    string tempAnotherPrereq = Console.ReadLine();
                    while (tempAnotherPrereq.Length == 0)
                    {
                        Console.WriteLine("The field cannot be empty");
                        tempAnotherPrereq = Console.ReadLine();
                    }
                    jiraItem.prerequisitesList.Add(tempAnotherPrereq);
                }
                else
                {
                    break;
                }
            } while (answerAnotherPrereq == 'y');
        }