Beispiel #1
0
 public int AddCourse(Course data)
 {
     var repo = DbContext.GetRepository<Course>();
     return Convert.ToInt32(repo.Insert(data));
 }
 private void WhenICreateAProposedCourse(CourseManager sut, string name, double credits, int classHoursPerWeek, out int  result)
 {
     // Arrange
     Course data = new Course() { CourseName = name, Credits = credits, ClassHourPerWeek = classHoursPerWeek };
     // Act
     result = sut.AddCourse(data);
     // Assert
     A.CallTo(() => FakeProvider.Context.GetRepository<Course>()).MustHaveHappened();
 }