private void AssertAcceptableResultForExistentWord(WordFindingResult result) { Assert.IsTrue(result.WordIndex > 0); #if DEBUG LogToAppFolderFile(result); #endif }
private void LogToAppFolderFile(WordFindingResult result) { try { File.AppendAllLines(@"catsKilled.log", new[] { string.Format("At [{0}] you killed [{1}] cats to find the word [{2}], or simply to get the [{3}] error code.", DateTime.Now.ToShortTimeString(), result.WebservicesCallCount, result.WordFound, result.ErrorCode) }); } catch (Exception) { } }
private static string MessageFor(WordFindingResult result, string wordToFind) { if (result.WordIndex > 0) { return(string.Format(Messages.WORD_FOUND, result.WebservicesCallCount, result.WordFound, result.WordIndex)); } return(string.Format(Messages.WORD_NOT_FOUND, result.WebservicesCallCount, wordToFind, result.ErrorCode)); }