public void ApplySortTest(string text, SortOptions sortOptions, string expectedResult) { ITextProcessAppService textProcessAppService = new TextProcessAppService(); string result = textProcessAppService.ApplySort(text, sortOptions); Assert.IsNotNullOrEmpty(result); Assert.AreEqual(expectedResult, result); }
public void GenerateStatisticsTest(string text, int hiphensQty, int spacesQty, int wordsQty) { ITextProcessAppService textProcessAppService = new TextProcessAppService(); TextStatisticsDto textStatisticsDto = textProcessAppService.GenerateStatistics(text); Assert.AreEqual(hiphensQty, textStatisticsDto.HiphensQuantity, "bad hiphens count"); Assert.AreEqual(spacesQty, textStatisticsDto.SpacesQuantity, "bad spaces count"); Assert.AreEqual(wordsQty, textStatisticsDto.WordsQuantity, "bad words count"); }