コード例 #1
0
 public void SetAttributeTest()
 {
     var target = new Document();
     const string name = "foo";
     object value = "bar";
     target.SetAttribute(name, value);
     Assert.AreEqual(value, target.GetAttribute(name));
 }
コード例 #2
0
 public void GetAttribute_WhenNotSet_ShouldThrowIndexOutOfRangeException()
 {
     var target = new Document();
     const string name = "foo";
     target.GetAttribute(name);
 }
コード例 #3
0
 public void GetSetAttributeTest()
 {
     var target = new Document();
     const string name = "foo";
     object expected = "bar";
     target.SetAttribute(name, expected);
     var actual = target.GetAttribute(name);
     Assert.AreEqual(expected, actual, "GetAttributeReturnedDifferentValueFromSet");
 }