Want to know about NUnit
-
Hi all! I got to know about NUnit framework. This is what I got NUnit is an open source unit testing framework for Microsoft .NET. It serves the same purpose as JUnit does in the Java world. NUnit.ASP is an expansion to the core NUnit framework and is also open source. It specifically looks at expanding NUnit to be able to handle testing user interface elements in ASP.NET. Example of an NUnit test fixture: using NUnit.Framework;
[TestFixture] public class TestWikipediaExampleOfNUnit { [Test] public void TestMultiplication() { Assert.AreEqual(4, 2*2, "Multiplication"); } }
My question is how can I use it to test my code or What do I need to test my code with NUnit. ThanksDon't Quit
-
Hi all! I got to know about NUnit framework. This is what I got NUnit is an open source unit testing framework for Microsoft .NET. It serves the same purpose as JUnit does in the Java world. NUnit.ASP is an expansion to the core NUnit framework and is also open source. It specifically looks at expanding NUnit to be able to handle testing user interface elements in ASP.NET. Example of an NUnit test fixture: using NUnit.Framework;
[TestFixture] public class TestWikipediaExampleOfNUnit { [Test] public void TestMultiplication() { Assert.AreEqual(4, 2*2, "Multiplication"); } }
My question is how can I use it to test my code or What do I need to test my code with NUnit. ThanksDon't Quit
Nitin1981 wrote:
My question is how can I use it to test my code or What do I need to test my code with NUnit.
which type code did you want to test. look at the nunit doc you can find what you need.
I think therefore I am --~--~---------~--~----~------------~-------~--~----~ My Blog and Website: http://www.cnblogs.com/pinzui/ http://www.pinzui.cn http://jnlinux.org --~--~---------~--~----~------------~-------~--~----~
-
Nitin1981 wrote:
My question is how can I use it to test my code or What do I need to test my code with NUnit.
which type code did you want to test. look at the nunit doc you can find what you need.
I think therefore I am --~--~---------~--~----~------------~-------~--~----~ My Blog and Website: http://www.cnblogs.com/pinzui/ http://www.pinzui.cn http://jnlinux.org --~--~---------~--~----~------------~-------~--~----~
Nunit test cases can be written for public methods in Business layer and data layer steps to follow to write nunit test cases 1. first identify the public method in BL or DAL 2. identify the parameters that method accepts 3. create all the parameters in SETUP part 4. Create an instance of that class in TEST part 5. call that method and pass the parameters u have created in SETUP 6. check the out of that method in an assert statement 7. clean up the paramaters that u have created in SETUP
-
Nunit test cases can be written for public methods in Business layer and data layer steps to follow to write nunit test cases 1. first identify the public method in BL or DAL 2. identify the parameters that method accepts 3. create all the parameters in SETUP part 4. Create an instance of that class in TEST part 5. call that method and pass the parameters u have created in SETUP 6. check the out of that method in an assert statement 7. clean up the paramaters that u have created in SETUP