Making sure a view exists

前端 未结 5 1111
执念已碎
执念已碎 2021-02-06 09:37

I\'m currently looking into unit testing for a new application I have to create. I\'ve got the basic testing going nicely (testing the ActionResult classes is pretty nice). One

5条回答
  •  太阳男子
    2021-02-06 10:30

    Knowing that the view exists in the solution is not terribly useful. What you really care about is that the view will be deployed, since your users (I hope) don't run your site within Visual Studio. In other words, what you are asking for is not a unit test, but an integration test. Therefore, you should use an appropriate tool for the job. Consider a web testing framework like Selenium.

提交回复
热议问题