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);
        }
Exemple #2
0
 public async Task <ActionResult> AddAthlete(Athlete athlete)
 {
     return(Ok(await _athleteRepository.AddAthlete(athlete)));
 }
 public AthleteDto CreateAthlete(AthleteRequest athleteRequest)
 {
     return(_athleteRepository.AddAthlete(ConvertRequestToDto(athleteRequest)));
 }