Пример #1
0
        public async Task TestGetWord()
        {
            using (var context = new bookAPIContext(options))
            {
                WordsController wordsController           = new WordsController(context);
                ActionResult <IEnumerable <Word> > result = await wordsController.GetWord();

                Assert.IsNotNull(result);                 // check not empty word list
                Assert.AreEqual(context.Word.Count(), 3); // check 3 elements in word list
            }
        }