public void WhenRequestingMissingResourceItThrowsNotFound() { AssertThrows <RamoneException>( () => FeedEndPoint.Get <SyndicationFeed>(new { feed = "Unknown" }), (e) => e.Response.StatusCode == HttpStatusCode.NotFound); }
public void WhenRequestingUnsupportedMediaTypeItThrowsUnsupportedMediaType() { AssertThrows <RamoneException>( () => FeedEndPoint.Get <string>(new { feed = "Petes" }), (e) => e.Response.StatusCode == HttpStatusCode.NotAcceptable); }
public void CanGetSimpleAtomFeed() { RamoneResponse <SyndicationFeed> response = FeedEndPoint.Get <SyndicationFeed>(new { feed = "Petes" }); Assert.AreEqual("Petes", response.Body.Title.Text); }