System.Reflection.Tests.PropertyInfoTests.GetConstantValue_NotConstant_ThrowsInvalidOperationException C# (CSharp) Метод

GetConstantValue_NotConstant_ThrowsInvalidOperationException() приватный Метод

private GetConstantValue_NotConstant_ThrowsInvalidOperationException ( Type type, string name ) : void
type Type
name string
Результат 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());
        }