예제 #1
0
        public void GetAllTest1()
        {
            var searchKeywordsDTO = new SearchKeywordsDTO(new KeyWordsRepository <KeyWords>());
            var keywords          = searchKeywordsDTO.GetAll().Where(c => c.KeyWord == ".NET");

            Assert.AreEqual(keywords.Count(), 1);
        }
예제 #2
0
        public void GetAllTest()
        {
            var searchKeywordsDTO = new SearchKeywordsDTO(new KeyWordsRepository <KeyWords>());
            var keywords          = searchKeywordsDTO.GetAll();

            Console.WriteLine(keywords.Count);
            Assert.AreEqual(keywords.Count, 10);
        }
예제 #3
0
        public void GetAllTest2()
        {
            var searchKeywordsDTO = new SearchKeywordsDTO(new GenericRepository <KeyWords>());
            var keywords          = searchKeywordsDTO.GetAll();
            var element           = keywords.Where(c => c.KeyWord == ".NET");

            Console.WriteLine(element.Count());
            Assert.AreEqual(element.Count(), 2);
        }
 // GET: KeyWords
 public ActionResult Index()
 {
     return(View(_searchKeywordsDTO.GetAll()));
 }