示例#1
0
        public void CanRemoveExistingCourse()
        {
            var dummyCourse = DummyDataGenerator.CreateDummyCourse();

            ICoursesModel model = new CoursesModel();
            dummyCourse.Id = model.AddOrUpdateCourse(dummyCourse).Id;

            // Remove the dummyCourse
            model.RemoveCourse(dummyCourse.Id);

            // Check that the course was removed from the Db
            var repo = new BizCollegeRepository<Course, string>();
            var fromDb = repo.Get(dummyCourse.Id);

            Assert.IsNull(fromDb);
        }