Esempio n. 1
0
        public static void Main(string[] args)
        {
            var(byWord, byLenght) = WordCounter.Do("I have a transportation device which is a red bike which I love to ride.");

            Console.WriteLine("First task:");
            Console.WriteLine("byWord:");
            Console.WriteLine(string.Join("\r\n", byWord.Select(x => $"{x.Key}={x.Value}")));
            Console.WriteLine();
            Console.WriteLine("byLenght:");
            Console.WriteLine(string.Join("\r\n", byLenght.Select(x => $"{x.Key}={x.Value}")));
            Console.WriteLine();
            Console.WriteLine();

            Console.WriteLine("Second task:");
            Console.WriteLine("Hello World!");
            var r = StringReverser.Do("Hello World!");

            Console.WriteLine(r);
        }
Esempio n. 2
0
        public void Should_handle_empty_string()
        {
            var actual = StringReverser.Do("");

            actual.Should().Be("");
        }
Esempio n. 3
0
        public void Should_reverse_string()
        {
            var actual = StringReverser.Do("I have a transportation device which is a red bike which I love to ride.");

            actual.Should().Be(".edir ot evol I hcihw ekib der a si hcihw ecived noitatropsnart a evah I");
        }