Model Error
Mocking – Set Object
If we have to mock below httpcontext class, model and loginservice I order to do unit test of login method
Test Method
Mocking of httpcontext in constructor
Note
the mock class and mock service and ReturnAsAsync and Mock.of shortcut
But as the email address is not using for password
comparison, we can ignore that by below code
Final Test method
No comments:
Post a Comment