public ActionResult Details(int id = 0) { Word word = db.Find(id); if (word == null) { return(HttpNotFound()); } return(View(word)); }
public void RecognizeWord_ShouldReturnRecognizedWords() { wordRepository.Find("as").Returns(new List <string> { "langas", "stalas", "pastatas" }); var result = wordService.RecognizeWord("as"); Assert.IsNotNull(result); Assert.AreEqual("langas", result.First()); wordRepository.Received().Find("as"); }
public IList <string> RecognizeWord(string word) { return(wordRepository.Find(word)); }