public void GetDealReturnsJson() { var repository = new DealRepository(); var result = repository.GetDeal(); Assert.That(result, Is.InstanceOf <ContentResult>()); Assert.AreEqual(result.ContentType, "application/json"); }
public void GetDealReturnsBundle() { var repository = new DealRepository(); var result = repository.GetDeal(); var obj = JObject.Parse((string)result.Content); int val; Assert.IsTrue(int.TryParse((string)obj["bundleId"], out val)); }
public Deal GetDealService(int id) { return(dealRepository.GetDeal(id)); }