示例#1
0
        static void Main(string[] args)
        {
            System.Console.Write("Enter a number of your choice: ");
            var input = System.Console.ReadLine();

            try
            {
                var result = IntegerSorter.Sort(int.Parse(input));

                System.Console.WriteLine($"Your number was {input} and we turned it into {result}");
            }
            catch
            {
                System.Console.WriteLine("You entered something that wasn't a number.");
            }
        }
示例#2
0
        public void Test1(int givenNumber, int expectedNumber)
        {
            var result = IntegerSorter.Sort(givenNumber);

            Assert.Equal(expectedNumber, result);
        }