Exemplo n.º 1
0
        public async Task GetAsync_Returns_statusCode_200()
        {
            //Arrange
            Mapper.Initialize(config => { config.CreateMap <CreateTeamViewModel, TeamDTO>().ReverseMap(); });
            var expextedTeams = GetExpectedTeams();

            _mockFMService.Setup(s => s.GetTeamsAsync()).ReturnsAsync(expextedTeams);
            //Act
            var result = await _teamController.GetAsync() as OkObjectResult;

            //Assert
            Mapper.Reset();
            Assert.Equal(200, result.StatusCode);
        }