Example #1
0
        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);
        }
Example #2
0
        public async Task <IActionResult> Post([FromBody] CreateTeamRequest request)
        {
            await _teamService.CreateAsync(request.AsEntity());

            return(Ok());
        }