Making sure a view exists

前端 未结 5 1114
执念已碎
执念已碎 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:35

    If you're using beta, your code-behind file will create a class for the View which you can check for using reflection.

    Otherwise, you could check for the file to exist in the right location.

提交回复
热议问题