public void AddAthlete_CreatesAthleteAndReturns()
        {
            var input = new AthleteDto
            {
                Username = "******",
                Email    = "*****@*****.**",
                FullName = "User One"
            };
            var expected = new AthleteDto
            {
                Username = "******",
                Email    = "*****@*****.**",
                FullName = "User One"
            };

            // act
            var actual = athleteRepository.AddAthlete(input);

            // assert
            Assert.Equal(expected, actual);
        }
コード例 #2
0
 public async Task <ActionResult> AddAthlete(Athlete athlete)
 {
     return(Ok(await _athleteRepository.AddAthlete(athlete)));
 }
コード例 #3
0
 public AthleteDto CreateAthlete(AthleteRequest athleteRequest)
 {
     return(_athleteRepository.AddAthlete(ConvertRequestToDto(athleteRequest)));
 }