public void Reverse_SpacedOutCharactersCharacters_ShouldReturn() { var reverseWordsService = new ReverseWordsService(); var actual = reverseWordsService.Reverse(" S P A C E Y "); Assert.AreEqual(" S P A C E Y ", actual); }
public void Reverse_StringSpecialCharacters_ShouldReturnStringReversed() { var reverseWordsService = new ReverseWordsService(); var actual = reverseWordsService.Reverse("P!u@n#c$t%u^a&t*i(o)n"); Assert.AreEqual("n)o(i*t&a^u%t$c#n@u!P", actual); }
public void Reverse_WordString_ShouldReturnReversedWord() { var reverseWordsService = new ReverseWordsService(); var actual = reverseWordsService.Reverse("Lorem."); Assert.AreEqual(".meroL", actual); }
public void Reverse_SingleSpaceString_ShouldReturnEmptyString() { var reverseWordsService = new ReverseWordsService(); var actual = reverseWordsService.Reverse(" "); Assert.AreEqual(" ", actual); }
public void Reverse_NullString_ShouldReturnEmptyString() { var reverseWordsService = new ReverseWordsService(); var actual = reverseWordsService.Reverse(null); Assert.AreEqual(string.Empty, actual); }
public void TestReverseReversesSentenceWordOrder() { // Arrange var input = "This is a test sentence"; // Act var result = ReverseWordsService.Reverse(input); // Assert Assert.AreEqual("sentence test a is This", result); }
public void TestReverseReversesSentenceWithPunctuation() { // Arrange var input = "This, is a test."; // Act var result = ReverseWordsService.Reverse(input); // Assert Assert.AreEqual("test. a is This,", result); }
public void TestReverseReversesSingleWordOrder() { // Arrange var input = "This"; // Act var result = ReverseWordsService.Reverse(input); // Assert Assert.AreEqual("This", result); }
public void Reverse_ShortString_ShouldReturnReversedString() { var reverseWordsService = new ReverseWordsService(); var actual = reverseWordsService.Reverse( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse gravida at elit quis pretium."); Assert.AreEqual( "meroL muspi rolod tis ,tema rutetcesnoc gnicsipida .tile essidnepsuS adivarg ta tile siuq .muiterp", actual); }
public string TestService(string sentense) { return(_subject.Reverse(sentense)); }