Making sure a view exists

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

    • No, I don't think you should split the test up as long as its just mainly a third assert and not very much more code.

    • Yes, I think a more descriptive name would be helpful.

    • Since you've verified it has the correct view name already, wouldn't simply successfully rendering the view verify its existence?

    I think that its great you are working on complete test coverage but here I feel like there might be more effective use of your time if you were able to move on to the part where you verify that the units that perform the actual specific login functions (such as verifying password hashes or whatever) are working correctly.

提交回复
热议问题