Esempio n. 1
0
        public void ClassInfoIntegationTests_GetAllClasses()
        {
            using (PrivateClassesDBContext dbContext = new PrivateClassesDBContext())
            {
                ClassInfoRepo repo = new ClassInfoRepo(dbContext);

                var res = repo.GetAllClasses();
                Assert.IsTrue(res != null && res.Count > 0 && res[0].ClassCategory != null);
            }
        }
Esempio n. 2
0
        public void ParticipantTests_Find_Mock()
        {
            ClassInfoRepo repo = new ClassInfoRepo(GetMockContext().Object)
            {
                IncludeNavigationProperties = false
            };

            var res = repo.GetAllClasses().Where(x => x.ClassName.ToLower().Contains("Birthday") && x.ClassCategory.CategoryName.ToLower() == "party");

            Assert.IsTrue(res != null);
        }
Esempio n. 3
0
        public void ParticipantTests_GetAllClasses_Mock()
        {
            ClassInfoRepo repo = new ClassInfoRepo(GetMockContext().Object)
            {
                IncludeNavigationProperties = false
            };

            var res = repo.GetAllClasses();

            Assert.IsTrue(res != null && res.Count == 2);
        }