Ejemplo n.º 1
0
 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");
 }
Ejemplo n.º 2
0
 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");
 }
Ejemplo n.º 3
0
 public void Tag_Is_Correct()
 {
     var element = new InputImage();
     Assert.That(element.Tag, Is.EqualTo("input"));
     Assert.That(element.Type, Is.EqualTo("image"));
 }
Ejemplo n.º 4
0
 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");
 }
Ejemplo n.º 5
0
 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");
 }