Example #1
0
        public void Ctor_InheritanceLevel(InheritanceLevel inheritanceLevel)
        {
            var attribute = new InheritanceAttribute(inheritanceLevel);

            Assert.Equal(inheritanceLevel, attribute.InheritanceLevel);
            Assert.Equal(inheritanceLevel == InheritanceLevel.NotInherited, attribute.IsDefaultAttribute());
        }
Example #2
0
        public void Ctor_Default()
        {
            var attribute = new InheritanceAttribute();

            Assert.Equal(InheritanceLevel.NotInherited, attribute.InheritanceLevel);
            Assert.True(attribute.IsDefaultAttribute());
        }
Example #3
0
        public void NotInherited_Get_ReturnsExpected()
        {
            InheritanceAttribute attribute = InheritanceAttribute.NotInherited;

            Assert.Same(attribute, InheritanceAttribute.NotInherited);

            Assert.Equal(InheritanceLevel.NotInherited, attribute.InheritanceLevel);
            Assert.True(attribute.IsDefaultAttribute());
        }
Example #4
0
        public void InheritedReadOnly_Get_ReturnsExpected()
        {
            InheritanceAttribute attribute = InheritanceAttribute.InheritedReadOnly;

            Assert.Same(attribute, InheritanceAttribute.InheritedReadOnly);

            Assert.Equal(InheritanceLevel.InheritedReadOnly, attribute.InheritanceLevel);
            Assert.False(attribute.IsDefaultAttribute());
        }