public void SearchAndSort_SearchSortThenSearchAgain_SearchResultIsTheSame() { // Arrange var file = new TxtFile(Path.Combine(Directory.GetCurrentDirectory(), @"ExampleFiles\ValidTxtFile.txt")); int searchOne = file.Search("baloo"); file.SortWords(); int searchTwo = file.Search("baloo"); // Assert Assert.AreEqual(searchOne, searchTwo); }
public void Search_WordIsNotInFile_ReturnsRightOccurance() { // Arrange var file = new TxtFile(Path.Combine(Directory.GetCurrentDirectory(), @"ExampleFiles\ValidTxtFile.txt")); // Assert Assert.AreEqual(0, file.Search("kuckeliku")); }