예제 #1
0
        public async Task DeleteAsync_Returns_and_statusCode_200()
        {
            //Arrang
            Mapper.Initialize(config =>
            {
                config.CreateMap <CreateTeamViewModel, TeamDTO>().ReverseMap();
            });
            int teamId = 1;

            _mockFMService.Setup(s => s.DeleteTeamAsync(teamId)).ReturnsAsync(true);
            //Act
            var result = await _teamController.DeleteAsync(teamId) as OkResult;

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