R
R
RouR2012-10-31 12:59:12
ASP.NET
RouR, 2012-10-31 12:59:12

How to test View in ASP.NET MVC?

With testing of controllers and models it is clear. It's not clear how to test View. Well, for example, there is a strict model in the view. The controller was refactored and a model of a different type was transferred to the view. The project will compile, but it will only give an error at runtime when you try to open it. Or even what kind of error will be in the view, which only razor will swear at.
I don't want to open it in a browser and manually check it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kastaneda, 2012-10-31
@RouR

The MvcBuildViews key in the project's *.csproj file should be set to true.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question