public void ValidateCorrectInput(string keyword1, string keyword2, string range, string filename) { ProximitySearch search = new ProximitySearch(keyword1, keyword2, range, filename); long n; bool isNumeric = long.TryParse(search.PerformSearch(), out n); Assert.AreEqual(isNumeric, true); }
public void ValidateWrongRange(string keyword1, string keyword2, string range, string filename) { ProximitySearch search = new ProximitySearch(keyword1, keyword2, range, filename); Assert.AreEqual(range + " is not a valid range. Range should be numeric and between 2 and 9223372036854775807.", search.PerformSearch()); }
public void ValidateWrongFile(string keyword1, string keyword2, string range, string filename) { ProximitySearch search = new ProximitySearch(keyword1, keyword2, range, filename); Assert.AreEqual("File '" + filename + "' does not exist.", search.PerformSearch()); }
public void SearchCountTest(string keyword1, string keyword2, string range, string filename, string answer) { ProximitySearch search = new ProximitySearch(keyword1, keyword2, range, filename); Assert.AreEqual(answer, search.PerformSearch()); }