Esempio n. 1
0
        public void TestRemovingAttribute()
        {
            AttributeCollection attributes = new AttributeCollection();

            attributes.Add("Test1", new AttributeValue("Test Value1"));
            attributes.Add("Test2", new AttributeValue("Test Value2"));
            attributes.Add("Test3", new AttributeValue("Test Value3"));
            attributes.Add("Test4", new AttributeValue("Test Value4"));

            Assert.IsTrue(attributes.ContainsAttribute("Test3"));
            Assert.IsTrue(attributes.Remove("Test3"));
            Assert.IsFalse(attributes.ContainsAttribute("Test3"));
        }
Esempio n. 2
0
        public void TestSuccessfullCheckIfAttributeExists()
        {
            AttributeCollection attributes        = new AttributeCollection();
            AttributeValue      newAttributeValue = new AttributeValue("Test Value");

            // Add the attribute
            attributes.Add("Test", newAttributeValue);

            Assert.IsTrue(attributes.ContainsAttribute("Test"));
        }
Esempio n. 3
0
        public void TestSuccessfullCheckIfAttributeExists()
        {
            AttributeCollection attributes = new AttributeCollection();
            AttributeValue newAttributeValue = new AttributeValue("Test Value");

            // Add the attribute
            attributes.Add("Test", newAttributeValue);

            Assert.IsTrue(attributes.ContainsAttribute("Test"));
        }
Esempio n. 4
0
        public void TestRemovingAttribute()
        {
            AttributeCollection attributes = new AttributeCollection();

            attributes.Add("Test1", new AttributeValue("Test Value1"));
            attributes.Add("Test2", new AttributeValue("Test Value2"));
            attributes.Add("Test3", new AttributeValue("Test Value3"));
            attributes.Add("Test4", new AttributeValue("Test Value4"));

            Assert.IsTrue(attributes.ContainsAttribute("Test3"));
            Assert.IsTrue(attributes.Remove("Test3"));
            Assert.IsFalse(attributes.ContainsAttribute("Test3"));
        }
Esempio n. 5
0
 public void TestFailedCheckIfAttributeExists()
 {
     AttributeCollection attributes = new AttributeCollection();
     Assert.IsFalse(attributes.ContainsAttribute("Not Found"));
 }
Esempio n. 6
0
        public void TestFailedCheckIfAttributeExists()
        {
            AttributeCollection attributes = new AttributeCollection();

            Assert.IsFalse(attributes.ContainsAttribute("Not Found"));
        }