I am executing If statement based on some vales but Nunit executes all statements even if the condition is false
I am executing If statement based on some vales but Nunit executes all statements
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nunit doesn’t actually evaluate your statements, it simply instantiates your tests and runs them. I would suggest that you install TestDriven.NET, if you haven’t already, and use the right-click test runner in your test to run it with the debugger. Set some breakpoints in your code and look at the values that will be evaluated for the if statement. I expect, with @Joe90, that the error is in your code, not Nunit.