public void When_Creating_element_With_Href_It_Sticks() { var element = new Link("http://foo"); Assert.That(element.Href, Is.EqualTo("http://foo")); }
public void Tag_Is_Correct() { var element = new Link(); Assert.That(element.Tag, Is.EqualTo("a")); }
public void When_Creating_element_With_Href_and_Dictionary_It_Sticks() { var hash = new Hash {{"Key1", "Val1"}, {"Key2", "Val2"}, {"Key3", "Val3"}}; var element = new Link("http://foo", hash); Assert.That(element.Href, Is.EqualTo("http://foo")); Assert.That(element.Tag == "a"); Assert.That(element.Attributes.Count == 4); Assert.That(element["Key1"] == "Val1"); }
public void Properties_Stick_When_Set() { var element = new Link {Href = "http://foo"}; Assert.That(element.Href, Is.EqualTo("http://foo")); element.Target = "_main"; Assert.That(element.Target, Is.EqualTo("_main")); }