public void GetPropertyValue_String() { // Act var actual = EnumAttributeHelper.GetPropertyValue <TestEnum, SimpleAttribute, string>(TestEnum.Value3, attribute => attribute.MyString); // Assert actual.ShouldHaveSameValueAs("d"); }
public void GetPropertyValue_String_NoAttributeDefined() { // Act EnumAttributeHelper.GetPropertyValue <TestEnum, SimpleAttribute, string>(TestEnum.Value1, attribute => attribute.MyString); }
public void GetPropertyValue_String_NullPropertyExpression() { // Act EnumAttributeHelper.GetPropertyValue <TestEnum, SimpleAttribute, string>(TestEnum.Value3, null); }
public void GetPropertyValue_String_NotAnEnum() { // Act EnumAttributeHelper.GetPropertyValue <SimpleStruct, SimpleAttribute, string>(new SimpleStruct(), null); }