示例#1
0
        public void CommitTest()
        {
            IUnitOfWork uow = new Repositories.UnitOfWork(dbContext.Object);

            uow.Student.Insert(new Common.Models.Student {
                EnrollmentDate = DateTime.Now, FirstMidName = "Suraj", LastName = "Bangale"
            });
            uow.Commit();
            dbContext.Verify(x => x.SaveChanges());
        }
示例#2
0
 public void UnitOfWorkNullContext()
 {
     IUnitOfWork uow = new Repositories.UnitOfWork(null);
 }
示例#3
0
        public void UnitOfWorkTest_Enrollment()
        {
            IUnitOfWork uow = new Repositories.UnitOfWork(dbContext.Object);

            Assert.IsNotNull(uow.Enrollment);
        }
示例#4
0
        public void UnitOfWorkTest_Instructor()
        {
            IUnitOfWork uow = new Repositories.UnitOfWork(dbContext.Object);

            Assert.IsNotNull(uow.Instructor);
        }
示例#5
0
        public void UnitOfWorkTest_Course()
        {
            IUnitOfWork uow = new Repositories.UnitOfWork(dbContext.Object);

            Assert.IsNotNull(uow.Course);
        }