public void ResignOfferTest() { ReserveOfferDto dto = new ReserveOfferDto() { Username = "******", OfferId = 3 }; IHttpActionResult result = _controller.ResignOffer(dto); var contentResult = result as OkNegotiatedContentResult <bool>; Offer o = _context.Offers.FirstOrDefault(x => x.Id == dto.OfferId); Assert.IsNotNull(o); Assert.AreEqual(o.IsBooked, false); Assert.IsNull(o.Customer); }