Пример #1
0
 public void WhenRequestingMissingResourceItThrowsNotFound()
 {
     AssertThrows <RamoneException>(
         () => FeedEndPoint.Get <SyndicationFeed>(new { feed = "Unknown" }),
         (e) => e.Response.StatusCode == HttpStatusCode.NotFound);
 }
Пример #2
0
 public void WhenRequestingUnsupportedMediaTypeItThrowsUnsupportedMediaType()
 {
     AssertThrows <RamoneException>(
         () => FeedEndPoint.Get <string>(new { feed = "Petes" }),
         (e) => e.Response.StatusCode == HttpStatusCode.NotAcceptable);
 }
Пример #3
0
        public void CanGetSimpleAtomFeed()
        {
            RamoneResponse <SyndicationFeed> response = FeedEndPoint.Get <SyndicationFeed>(new { feed = "Petes" });

            Assert.AreEqual("Petes", response.Body.Title.Text);
        }