Esempio n. 1
0
        public async void GetAllAsync_RepositoryConsistsOf2Records_ShouldReturnListOf2Records()
        {
            // Arrange
            const int expected = 2;

            // Act
            var list = await _hallsController.GetAllAsync(null) as OkObjectResult;

            // Assert
            Assert.Equal(expected, (list.Value as List <HallDTO>).Count);
        }
Esempio n. 2
0
        public async void GetAllAsync_RepositoryIsEmpty_ShouldReturnEmptyList()
        {
            // Act
            var list = await _hallsController2.GetAllAsync(null) as OkObjectResult;

            // Assert
            Assert.Empty((list.Value as List <HallDTO>));
        }