public void EnumGetAttributesReturnsEmptyArrayIfNoAttributeOnEnumField() { TestEnum value = TestEnum.Zero; TestEnumTwoAttribute[] attributes = value.GetAttributes <TestEnumTwoAttribute>(); Assert.IsNotNull(attributes); Assert.IsEmpty(attributes); }
public void EnumGetAttributesReturnsEmptyArrayIfSpecifiedAttributeIsNotOnEnumField() { TestEnum value = TestEnum.One; TestEnumTwoAttribute[] attributes = value.GetAttributes <TestEnumTwoAttribute>(); Assert.IsNotNull(attributes); Assert.IsEmpty(attributes); }
public void EnumGetAttributesReturnsArrayIfAttributeOnEnumField() { const int expectedLength = 2; TestEnum value = TestEnum.Two; TestEnumTwoAttribute[] attributes = value.GetAttributes <TestEnumTwoAttribute>(); Assert.IsNotNull(attributes); Assert.AreEqual(expectedLength, attributes.Length); }