public async Task GetCourseInstancesShouldCallGetAll() { //Arrange var fixture = new CourseInstanceApiFixture(); //Act await fixture.ExecuteGetCourseInstances(); //Assert fixture.AssertGetAllIsCalled(); }
public async Task TwoRecordsInRepoShouldReturnListWithTwoCourseInstances() { //Arrange var fixture = new CourseInstanceApiFixture() .WithXRecords(2); int expected = 2; //Act var result = await fixture.ExecuteGetCourseInstances(); //Assert Assert.Equal(expected, result.Count()); }
public async Task EmptyRepositoryShouldReturnEmptyList() { //Arrange var fixture = new CourseInstanceApiFixture() .WithEmptyRepository(); int expected = 0; //Act var actual = await fixture.ExecuteGetCourseInstances(); //Assert Assert.Equal(expected, actual.Count()); }