コード例 #1
0
ファイル: LinkExpression.cs プロジェクト: jemacom/fubumvc
        public Link CreateLink(IUrlRegistry urls)
        {
            var url = _source(urls);
            var link = new Link(url);
            _modifications.Each(x => x(link));

            return link;
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
ファイル: LinkExpression.cs プロジェクト: jemacom/fubumvc
 void ILinkModifier.Modify(Link link)
 {
     _modifications.Each(x => x(link));
 }
コード例 #6
0
        public void set_the_uri_of_a_syndication_link()
        {
            var link = new Link("http://somewhere.com/method");

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