public async Task EditShouldReturnDbWithEditedItem() { // Arrange var db = this.Context; this.PopulateData(db); var advertisementsService = new AdvertisementService(db); var advertisementId = 1; var newName = "newnamenewnamenewname"; var newDescription = "newnamenewnamenewname"; var newPrice = 350m; var newCategoryId = 1; // Act await advertisementsService.Edit( advertisementId, newName, newDescription, newPrice, newCategoryId); // Assert db .Advertisements .Where(a => a.Id == advertisementId) .Select(a => a.Name) .FirstOrDefault() .Should() .Be(newName); db .Advertisements .Where(a => a.Id == advertisementId) .Select(a => a.Description) .FirstOrDefault() .Should() .Be(newDescription); db .Advertisements .Where(a => a.Id == advertisementId) .Select(a => a.Price) .FirstOrDefault() .Should() .Be(newPrice); db .Advertisements .Where(a => a.Id == advertisementId) .Select(a => a.CategoryId) .FirstOrDefault() .Should() .Be(newCategoryId); }