public virtual async Task <ClubDto> UpdateAsync(Guid id, ClubUpdateDto input) { Club club = await _clubRepository.GetAsync(id); club.Name = input.Name; club = await _clubRepository.UpdateAsync(club, autoSave : true); return(ObjectMapper.Map <Club, ClubDto>(club)); }
public async Task UpdateAsync() { // Arrange ClubUpdateDto input = new ClubUpdateDto() { Name = "143871a4e4294ced94757d8ba4e861f2ab712c1241e24d058540666876d7289b02b17a8cc7d3431ab37381fa6923f624de67" }; // Act ClubDto serviceResult = await _clubsAppService.UpdateAsync(Guid.Parse("d772238a-9871-47d7-84d5-c45083799954"), input); // Assert Club result = await _clubRepository.FindAsync(x => x.Id == serviceResult.Id); result.ShouldNotBe(null); result.Name.ShouldBe("143871a4e4294ced94757d8ba4e861f2ab712c1241e24d058540666876d7289b02b17a8cc7d3431ab37381fa6923f624de67"); }