public void EvaluateAll_Test2() { IDataReader dataReader = new TextFileDataReader(TestFilePath2); IStringEvaluator eval = new PalindromeEvaluator(dataReader); Assert.AreEqual(20, eval.EvaluateAll()); }
public ActionResult Palindromes(PalindromeTool pt) { if (ModelState.IsValid) { var request = new PalindromeRequest(); var evaluator = new PalindromeEvaluator(); request.RawString = pt.RawString; request = evaluator.EvaluatePalindrome(request); if (request.IsPalindrome) { pt.IsPalindrome = 1; } else { pt.IsPalindrome = 2; } return(View("Palindromes", pt)); } return(View("Palindromes")); }
public PalindromeEvaluatorTest() { _dataReader = new TextFileDataReader(TestFilePath1); _eval = new PalindromeEvaluator(_dataReader); }