namespace InterviewExercise
public static string ReverseSentenceWords(string sentence)
public static void Main()
var x = new NUnitLite.AutoRun().Execute(new string[]{"--test:InterviewExercise.ReverserTests", "--noc"});
Console.WriteLine("----------------------------------------------");
Console.WriteLine(x == 0 ? "All Test Passed..." : string.Format("{0} tests failed...", x));
Console.WriteLine("----------------------------------------------");
public class ReverserTests
[TestCase("Hello", "Hello")]
[TestCase("Hello world", "world Hello")]
[TestCase("May the Fourth be with you", "you with be Fourth the May")]
[TestCase("Hello and happy new year!", "year! new happy and Hello")]
public void Reverse_ShouldReverseSentence(string input, string expected)
var revertedSentence = Reverser.ReverseSentenceWords(input);
Assert.AreEqual(expected, revertedSentence);