public async Task Test_Delete_Object_Returns_Deleted_Id() { var id = Guid.NewGuid(); var mockOdd = GenerateOddMock(); mockOdd.Id = id; var mockOddDtoToDelete = GenerateOddDtoMock(); mockOddDtoToDelete.Id = id; _oddsRepository.DeleteAsync(Arg.Any <Odd>()).Returns(Task.FromResult(mockOdd)); var result = await sut.DeleteAsync(mockOddDtoToDelete); Assert.AreEqual(result.Id, id); }
public async Task <Guid> DeleteAsync(Guid id) { await _oddsRepository.DeleteAsync <Odd>(id); return(id); }