Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Want to know about NUnit

Want to know about NUnit

Scheduled Pinned Locked Moved ASP.NET
asp-netquestioncsharpjavadesign
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nitin1981
    wrote on last edited by
    #1

    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. Thanks

    Don't Quit

    P 1 Reply Last reply
    0
    • N Nitin1981

      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. Thanks

      Don't Quit

      P Offline
      P Offline
      prolibertine
      wrote on last edited by
      #2

      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 --~--~---------~--~----~------------~-------~--~----~

      V 1 Reply Last reply
      0
      • P prolibertine

        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 --~--~---------~--~----~------------~-------~--~----~

        V Offline
        V Offline
        vasanth kabbur
        wrote on last edited by
        #3

        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

        N 1 Reply Last reply
        0
        • V vasanth kabbur

          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

          N Offline
          N Offline
          Nitin1981
          wrote on last edited by
          #4

          Thaks guys for your suggestion.

          Don't Quit

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups