Hi all, i want to ask about Nunit.
Is there anyone there in this forum use Nunit and does it make a significant improvement to c# codes
What about Exception Handling What is the difference between Nunit and Exception Handling
Thanks :D
Hi all, i want to ask about Nunit.
Is there anyone there in this forum use Nunit and does it make a significant improvement to c# codes
What about Exception Handling What is the difference between Nunit and Exception Handling
Thanks :D
Nunit
Shyam Sundar R
OM$
Hi!
I can't really tell how much usefull is it - trust me, try it!
I think NUnit is such a tool that all .NET developers should know
Exception handling is for catching unexpected errors you shouldn't catch expected errors in most cases, because expection handling hits performance), whic occours while the user runs your program.
NUnit is a testing framework, whic is for finding bugs fast and effectively in the development stage.
Joy4Sonu
This is pretty handy for quickly getting your feet wet (hence the name "quick start" <g>)
http://www.nunit.org/index.php p=quickStart&r=2.2.7
If you're going more for a complete book, my favorite is "Test Driven Development" by Kent Beck
Polity4h
It should also be noted that you can use NUnit to verify that your code throws exceptions that you have written. For example, given a method which takes a parameter of type object, a common thing to do is put a "guard" statement at the top of the method which checks the parameter for null and throws an exception if the parameter is null. In your NUnit test, you can add the "ExpectedExceptionAttribute" attribute to your test method, and then call method passing null as the parameter value. Because in your test method you have declared that the test expects an exception, the test will pass if the exception is thrown - otherwise it will fail.
In that light, hopefully you can see that exception handling is part of writing good code. NUnit is a tool for helping you write good code - no matter the part.