Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Add more ExpressionHelper tests #5792

@dougbu

Description

@dougbu

Following up on PR #5782 and @pranavkm's question, should add tests covering other lambda expressions that might start with "model" e.g.

var model = "Some string";
var text = ExpressionHelper.GetExpressionText((Expression<Func<TestModel, string>>)(m => model));

or

var text = ExpressionHelper.GetExpressionText((Expression<Func<TestModel, int>>)(m => MyApp.Model.Constants.CopyrightYear));

or

var text = ExpressionHelper.GetExpressionText(Expression<Func<TestModel, string>>)(m => StaticClass.Model.Name));

Not saying we need to fix problems if any of the above confuse ExpressionHelper. But, we should know how they behave and perhaps warn people (in docs) if some choices behave strangely.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions