예제 #1
0
        public ActionResult Details(int id = 0)
        {
            Word word = db.Find(id);

            if (word == null)
            {
                return(HttpNotFound());
            }
            return(View(word));
        }
예제 #2
0
        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");
        }
예제 #3
0
 public IList <string> RecognizeWord(string word)
 {
     return(wordRepository.Find(word));
 }