public void CreateLinkValue_Throws_When_Uri_Is_Null() { Assert.Throws <ArgumentNullException>( "linkTargetUri", () => LinkValueHelpers.CreateLinkValue( null, "relationType", int.MaxValue, int.MaxValue)); }
CreateLinkValue_Throws_When_RelationType_Is_NullEmptyOrWhitespace( string value) { Assert.Throws <ArgumentException>( "relationType", () => LinkValueHelpers.CreateLinkValue( new Uri("http://localhost/"), value, int.MaxValue, int.MaxValue)); }
public void CreateLinkValue_Returns_LinkValue( string expected, string value, int offset, int limit) { var relationType = "relationType"; var result = LinkValueHelpers.CreateLinkValue( new Uri(value), relationType, offset, limit); Assert.NotNull(result); Assert.Contains( relationType, result.RelationType.Relations); Assert.Equal( expected, result.TargetUri.ToString()); }