Example #1
0
        public void GetAllEntitiesCount()
        {
            TopicRepository repository = new TopicRepository();
            var             topics     = repository.GetAllEntities <Topic>();

            Assert.AreEqual(repository.Topics.Count, topics.Count);
        }
Example #2
0
        public void GetAllEntitiesEntries()
        {
            TopicRepository repository = new TopicRepository();
            var             topics     = repository.GetAllEntities <Topic>();

            bool successFlag = false;

            foreach (var obtainedItem in topics)
            {
                successFlag = false;
                foreach (var originalItem in repository.Topics)
                {
                    if (obtainedItem.Equals(originalItem))
                    {
                        successFlag = true;
                        break;
                    }
                }
                if (!successFlag)
                {
                    Assert.Fail(EntriesNotMutchErrorText);
                }
            }
        }