static void Main(string[] args)
        {
            Console.WriteLine("WELCOME TO THE STRING REVERSER! \n Try it out by writing a sentence, a paragraph or just a single word!");
            string userInput = Console.ReadLine();

            Console.WriteLine(StringReverser.Reverse(userInput));
            Console.WriteLine("--------------------------");
            Console.WriteLine("Hope I got it right ;)");
            Console.WriteLine("Press any key to close the program...");
            Console.ReadKey();
        }
 public void Reverse_GivenNull_ThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() => StringReverser.ReverseString(null));
 }
Example #3
0
 static void Main(string[] args)
 {
     Console.WriteLine(StringReverser.ReverseString("racecar"));
 }
        public void Reverse_GivenString_ReturnsReversed(string input, string expected)
        {
            var result = StringReverser.ReverseString(input);

            Assert.Equal(expected, result);
        }