Exemple #1
0
        public async Task GetCourseInstancesShouldCallGetAll()
        {
            //Arrange
            var fixture = new CourseInstanceApiFixture();

            //Act
            await fixture.ExecuteGetCourseInstances();

            //Assert
            fixture.AssertGetAllIsCalled();
        }
Exemple #2
0
        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());
        }
Exemple #3
0
        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());
        }