Hello.
Who can help me with UnitTest in C # / MVC?
I do not understand how Exception can be fixed, it comes from the fact that my written program ( UnitTest ) is not complete.
I am testing the Login() function, setting the "email" and "password" at the entrance, the method in the Unit Test-e works separately from the project, and for this it is necessary for the project to work in parallel to communicate with the base / Global.asax file (5 figure)
Return values "email" and "password" -> null (when doing debag), no connection to the server, and always generated
Exception Message: "Test method UnitProject.UnitTest.TestLoginUser threw exception: Ogma.Project.Common.Security.LoginException: There is an error on server side."
I think the problem is in the ConnectionString (2 image)
Returns null during debug (3 figure)
But I have a ConnectionString (4 image)
The test is written for AccountController . The test run code (1 image)




