public void When_Creating_element_With_Src_It_Sticks() { var element = new InputImage("http://image.foo.jpg"); Assert.That(element.Tag, Is.EqualTo("input")); Assert.That(element.Type, Is.EqualTo("image")); Assert.That(element.Src == "http://image.foo.jpg"); }
public void When_Creating_element_With_Src_And_Dictionary_Sticks() { var hash = new Hash {{"Key1", "Val1"}, {"Key2", "Val2"}, {"Key3", "Val3"}}; var element = new InputImage("http://image.foo.jpg", hash); Assert.That(element.Tag, Is.EqualTo("input")); Assert.That(element.Attributes.Count == 5); Assert.That(element["Key1"] == "Val1"); Assert.That(element.Src == "http://image.foo.jpg"); }
public void Tag_Is_Correct() { var element = new InputImage(); Assert.That(element.Tag, Is.EqualTo("input")); Assert.That(element.Type, Is.EqualTo("image")); }
public void When_Creating_element_With_Dictionary_Sticks() { var hash = new Hash {{"Key1", "Val1"}, {"Key2", "Val2"}, {"Key3", "Val3"}}; var element = new InputImage(hash); Assert.That(element.Tag, Is.EqualTo("input")); Assert.That(element.Attributes.Count == 4); Assert.That(element["Key1"] == "Val1"); }
public void Properties_Stick_When_Set() { var element = new InputImage {Src = "Src Sticks"}; Assert.That(element.Src == "Src Sticks"); element.Alt = "Alt Sticks"; Assert.That(element.Alt == "Alt Sticks"); }