public void Value_for_List_DomValue_will_append_values() { var attr = new DomDocument().CreateAttribute("h"); attr.SetValue(new List <string>()); attr.Value = "hello"; attr.AppendValue("world"); Assert.Equal(new List <string> { "hello", "world" }, attr.GetValue <List <string> >()); }
public void Value_for_Uri_DomValue_will_apply_Uri_base_uri() { var attr = new DomDocument().CreateAttribute("h"); attr.BaseUri = new Uri("https://example.com"); attr.SetValue(new Uri("./hello.txt", UriKind.Relative)); Assert.Equal( new Uri("https://example.com/hello.txt"), attr.GetValue <Uri>() ); Assert.Equal("./hello.txt", attr.Value); }