public void CreateLinkHeaderWithRelation() { var link = new Link() { Target = new Uri("http://localhost/{?foo}"), Relation = "related", Title = "foo" }; Assert.Equal("<http://localhost/{?foo}>;rel=\"related\";title=\"foo\"", link.AsLinkHeader()); }
public void CreateLinkHeaderWithMediaTypeAndLanguages() { var link = new Link() { Target = new Uri("http://localhost/{?foo}"), Type = "application/foo" }; link.HrefLang.Add(new CultureInfo("en-GB")); link.HrefLang.Add(new CultureInfo("en-CA")); Assert.Equal("<http://localhost/{?foo}>;rel=\"related\";hreflang=en-GB;hreflang=en-CA;type=\"application/foo\"", link.AsLinkHeader()); }
public void CreateLinkHeader() { var link = new Link() { Target = new Uri("http://localhost/{?foo}") }; Assert.Equal("<http://localhost/{?foo}>;rel=\"related\"", link.AsLinkHeader()); }