示例#1
0
        public static string GetHomework01Result(string inputString)
        {
            var sortingSvc = new TextSorting();
            var result     = sortingSvc.SortByAlphabetical(inputString);

            return(result);
        }
示例#2
0
        public void TextSort_Success(string text, string expected)
        {
            var textSorting = new TextSorting();
            var result      = textSorting.SortByAlphabetical(text);

            Assert.Equal(expected, result);
        }
示例#3
0
        public void TextSort_Fail(string text)
        {
            var textSorting = new TextSorting();
            var result      = textSorting.SortByAlphabetical(text);

            Assert.Empty(result);
        }
示例#4
0
        public void SortingText(string inputString, string expected)
        {
            var sut    = new TextSorting();
            var result = sut.SortByAlphabetical(inputString);

            Assert.Equal(expected, result);
        }
示例#5
0
        public void TestSortByAlphabetical(string text, string expectText)
        {
            var sut    = new TextSorting();
            var result = sut.SortByAlphabetical(text);

            Assert.Equal(expectText, result);
        }
        public void InputTextThatMatchPlatternItCanBeSorting(string expected, string inputString)
        {
            var sortingSvc = new TextSorting();
            var actual     = sortingSvc.SortByAlphabetical(inputString);

            Assert.Equal(expected, actual);
        }
示例#7
0
        static void Main(string[] args)
        {
            Console.Write("Hello Welcome to TextSort analysis (HomeWork 01)\nWhich text would you want to sort?:");
            var text        = Console.ReadLine();
            var textSorting = new TextSorting();
            var result      = textSorting.SortByAlphabetical(text);

            System.Console.WriteLine($"Result: {result}");
        }
示例#8
0
        static void Main(string[] args)
        {
            Console.Write("Input text : ");
            var text    = Console.ReadLine();
            var sut     = new TextSorting();
            var sort    = sut.SortByAlphabetical(text);
            var builder = new StringBuilder();

            builder.Append("Result: ").Append(sort);
            Console.WriteLine(builder);
        }