HasValue() private method

Determines if the enumeration for the name is set.
private HasValue ( string name ) : bool
name string The name of the enumeration to check.
return bool
Esempio n. 1
0
        public void AttributeColumnHasValue()
        {
            var column = new AttributeColumn(typeof(ComponentAttributes), 260);
            Assert.IsTrue(column.HasValue("RegistryKeyPath"));
            Assert.IsTrue(column.HasValue("SixtyFourBit"));
            Assert.IsFalse(column.HasValue("None"));

            column = new AttributeColumn(typeof(ComponentAttributes), 0);
            Assert.IsFalse(column.HasValue("RegistryKeyPath"));
            Assert.IsFalse(column.HasValue("SixtyFourBit"));
            Assert.IsTrue(column.HasValue("None"));

            Assert.IsFalse(column.HasValue("Invalid"));
        }
Esempio n. 2
0
        public void AttributeColumnHasValue()
        {
            var column = new AttributeColumn(typeof(ComponentAttributes), 260);

            Assert.IsTrue(column.HasValue("RegistryKeyPath"));
            Assert.IsTrue(column.HasValue("SixtyFourBit"));
            Assert.IsFalse(column.HasValue("None"));

            column = new AttributeColumn(typeof(ComponentAttributes), 0);
            Assert.IsFalse(column.HasValue("RegistryKeyPath"));
            Assert.IsFalse(column.HasValue("SixtyFourBit"));
            Assert.IsTrue(column.HasValue("None"));

            Assert.IsFalse(column.HasValue("Invalid"));
        }