public void CreateTeamRequest_AsEntity_NoParticipants_ReturnsEmptyList() { //Arrange var request = new CreateTeamRequest { Name = "Test", Participants = null }; //Act var team = request.AsEntity(); //Assert Assert.IsEmpty(team.Participants); }
public async Task <IActionResult> Post([FromBody] CreateTeamRequest request) { await _teamService.CreateAsync(request.AsEntity()); return(Ok()); }