Example #1
0
        public Link CreateLink(IUrlRegistry urls)
        {
            var url = _source(urls);
            var link = new Link(url);
            _modifications.Each(x => x(link));

            return link;
        }
        public void sets_the_title_if_it_exists()
        {
            var link = new Link("http://somewhere.com/method");

            link.ToSyndicationLink().Title.ShouldBeNull();

            link.Title = "something";

            link.ToSyndicationLink().Title.ShouldEqual(link.Title);
        }
        public void sets_the_relationship_type_if_it_exists()
        {
            var link = new Link("http://somewhere.com/method");

            link.ToSyndicationLink().RelationshipType.ShouldBeNull();

            link.Rel = "something";

            link.ToSyndicationLink().RelationshipType.ShouldEqual(link.Rel);
        }
        public void sets_the_mime_type_if_it_exists()
        {
            var link = new Link("http://somewhere.com/method");

            link.ToSyndicationLink().MediaType.ShouldBeNull();

            link.ContentType = "something";

            link.ToSyndicationLink().MediaType.ShouldEqual(link.ContentType);
        }
Example #5
0
 void ILinkModifier.Modify(Link link)
 {
     _modifications.Each(x => x(link));
 }
        public void set_the_uri_of_a_syndication_link()
        {
            var link = new Link("http://somewhere.com/method");

            link.ToSyndicationLink().Uri.OriginalString.ShouldEqual(link.Url);
        }