System.Reflection.Tests.PropertyInfoTests.GetConstantValue_NotConstant_ThrowsInvalidOperationException C# (CSharp) Method

GetConstantValue_NotConstant_ThrowsInvalidOperationException() private method

private GetConstantValue_NotConstant_ThrowsInvalidOperationException ( Type type, string name ) : void
type Type
name string
return void
        public void GetConstantValue_NotConstant_ThrowsInvalidOperationException(Type type, string name)
        {
            PropertyInfo propertyInfo = GetProperty(type, name);
            Assert.Throws<InvalidOperationException>(() => propertyInfo.GetConstantValue());
            Assert.Throws<InvalidOperationException>(() => propertyInfo.GetRawConstantValue());
        }