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);
}
}