Пример #1
0
        public void GetEntityWithNotExistingID()
        {
            TopicRepository repository  = new TopicRepository();
            Topic           resultTopic = repository.GetEntity <Topic>(NotExistindID);

            Assert.IsNull(resultTopic);
        }
Пример #2
0
        public void GetEntityEqualsToOriginal()
        {
            TopicRepository repository = new TopicRepository();
            List <Topic>    topics     = repository.Topics;
            Topic           resultRole = repository.GetEntity <Topic>(ExistingID);

            Assert.AreEqual(repository.Topics.Where(u => u.ID == ExistingID).FirstOrDefault(), resultRole);
        }