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

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

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

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