BatchThat.Test.ViewModels.ViewModelBaseTest.GetPropertyInfo_WhenParameterIsField C# (CSharp) Метод

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

private GetPropertyInfo_WhenParameterIsField ( ) : void
Результат void
        public void GetPropertyInfo_WhenParameterIsField()
        {
            ConcreteImageProcessorViewModel viewModel = new ConcreteImageProcessorViewModel();

            try
            {
                viewModel.GetPropertyInfo(viewModel, model => model.Field);
                Assert.False(true, "exception should have been thrown");
            }
            catch (ArgumentException exception)
            {
                Assert.Equal("Expression 'model => model.Field' refers to a field, not a property.",
                             exception.Message);
            }
        }