public void StringService_SortEmptyText_ShouldReturnExpectedResult() { // Arrange var text = string.Empty; var stringService = new StringService(); // Act var result = stringService.GetSortedText(text, SortType.AlphabeticAsc); // Assert Assert.NotNull(result); Assert.AreEqual(1, result.Count); Assert.AreEqual(string.Empty, result[0]); }
public void StringService_SortLengthAsc_ShouldReturnExpectedResult() { // Arrange var text = "Hi- how are you?"; var stringService = new StringService(); // Act var result = stringService.GetSortedText(text, SortType.LengthAsc); // Assert Assert.NotNull(result); Assert.AreEqual(4, result.Count); Assert.AreEqual("Hi-", result[0]); Assert.AreEqual("how", result[1]); Assert.AreEqual("are", result[2]); Assert.AreEqual("you?", result[3]); }