public void ShouldGetUriFromAtomLink()
        {
            const string xml = XmlHeader + "<order><atom:link rel='refresh' href='http://localhost/orders/1' xmlns:atom='http://www.w3.org/2005/Atom'/></order>";

            var uri = new DynamicXmlContentParser(xml).UriFor("refresh");

            uri.ShouldBeEqualTo(new Uri("http://localhost/orders/1"));
        }
        public void ShouldGetNullUriIfAtomLinkIsMalformedWithLackingRelAttribute()
        {
            const string xml = XmlHeader + "<order><atom:link href='http://localhost/orders/1' xmlns:atom='http://www.w3.org/2005/Atom'/></order>";

            var uri = new DynamicXmlContentParser(xml).UriFor("refresh");

            uri.ShouldBeNull();
        }
        public void ShouldGetNullUriIfHrefAttributeValueIsNotAValidUri()
        {
            const string xml = XmlHeader + "<order><atom:link rel='refresh' href='' xmlns:atom='http://www.w3.org/2005/Atom'/></order>";

            var uri = new DynamicXmlContentParser(xml).UriFor("refresh");

            uri.ShouldBeNull();
        }
        public void ShouldGetNullUriIfAtomLinkDoesNotExist()
        {
            const string xml = XmlHeader + "<order></order>";

            var uri = new DynamicXmlContentParser(xml).UriFor("refresh");

            uri.ShouldBeNull();
        }