public virtual async Task <ClubDto> CreateAsync(ClubCreateDto input) { Club club = new Club(GuidGenerator.Create(), input.Name); club = await _clubRepository.InsertAsync(club, autoSave : true); return(ObjectMapper.Map <Club, ClubDto>(club)); }
public async Task CreateAsync() { // Arrange ClubCreateDto input = new ClubCreateDto { Name = "bba11c3003ac4085a238b470f78c262d18e0a974712a4fd4a3bd405ba7521daadb7473f92d85418fb1acb8bc81880207ebf2" }; // Act ClubDto serviceResult = await _clubsAppService.CreateAsync(input); // Assert Club result = await _clubRepository.FindAsync(x => x.Id == serviceResult.Id); result.ShouldNotBe(null); result.Name.ShouldBe("bba11c3003ac4085a238b470f78c262d18e0a974712a4fd4a3bd405ba7521daadb7473f92d85418fb1acb8bc81880207ebf2"); }