コード例 #1
0
        public async Task GetCourseInstancesShouldCallGetAll()
        {
            //Arrange
            var fixture = new CourseInstanceApiFixture();

            //Act
            await fixture.ExecuteGetCourseInstances();

            //Assert
            fixture.AssertGetAllIsCalled();
        }
コード例 #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());
        }
コード例 #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());
        }