public async Task DeleteDelegateOfferById() { //Arrange var product1 = new DelegateOffer { Id = Guid.NewGuid(), Title = "Title1", Description = "Description1" }; var product2 = new DelegateOffer { Id = Guid.NewGuid(), Title = "Title2", Description = "Description2" }; await _delegateRepository.CreateDelegateOffer(product1); await _delegateRepository.CreateDelegateOffer(product2); //Act await _delegateRepository.DeleteDelegateOffer(product1.Id); var result = await _delegateRepository.GetDelegateOffer(product1.Id); var resultAll = await _delegateRepository.GetAllDelegateOffers(); //Assert Assert.Null(result); Assert.NotNull(resultAll); Assert.NotEmpty(resultAll); Assert.Single(resultAll); }
public async Task <DelegateOffer> GetDelegateOffer(Guid id) { return(await _delegateRepository.GetDelegateOffer(id)); }