Visual Studio C# NUnitTest Primer Tutorial

Visual Studio C# NUnitTest Primer Tutorial

Visual Studio C# NUnitTest Primer Tutorial

The acronym SDLC (Software Development Life Cycle) describes a lot of what the environment for a programmer consists of, but there are so many variations within the workplace of where the role of the “programmer” starts and stops.

One of the most contentious divisions is about where the responsibility for testing code sits, and, a bit before that, what does testing mean for your code. To me, testing can involve at least (in order of likelihood) some/all of:

  • unit testing
  • team testing
  • component testing
  • quality assurance testing
  • user acceptance testing
  • load testing
  • disaster recovery testing

As a programmer I feel very responsible for the unit testing component because … doh! … you want to do a good job. Even here, though, it can be argued that you should work in teams where even unit testing has that second set of eyes applied to it … hence the team testing concept. Definitely with the non unit testing testing types an independent eye can be good to offset the naturally optimistic ideas of most programmers.

As a programmer I feel that unit testing is both the important thing a programmer can do, and sometimes the part of the SDLC that they spend the most time doing.

There is no doubt that today’s C# console project code in Visual Studio (IDE) for a Windows desktop environment with an Arithmetic class involving simple mathematical methods lacks that real world scenario that you will be likely to want NUnit to be used on, but use it as a starting point to learn more. Here is a good link to start further studies. The main introductory concept to get your head around is the idea of an Assertion.

Today we show a Visual Studio (IDE) C# programming tool called NUnitTest, which is a downloadable Online Template written by Ernest Polataev.

Here is some downloadable C# programming supervisory source code which you might want to rename to Program.cs

Here is some downloadable C# programming Arithmetic class (being tested) source code which you might want to rename to Arithmetic.cs

Here is some downloadable C# programming testing class source code which you might want to rename to TestFixture.cs

Maybe you’d like to continue on with the C# theme, and if so, you could read C# Socket Primer Tutorial as below.


Previous tutorial of interest C# Socket Primer Tutorial is shown below.

C# Socket Primer Tutorial

C# Socket Primer Tutorial

C# using Visual Studio on Windows is a great language to learn. If you like C# you may eventually like VB.Net, and vice versa. It has sophisticated data structures, can be Object Oriented and makes great Windows desktop applications or can be the code behind an ASP.Net website or web application.

C# and VB.Net have Visual Studio support for functionality to do with networking and the use of sockets, as described below at Wikipedia.

A network socket is an endpoint of an inter-process communication flow across a computer network. Today, most communication between computers is based on the Internet Protocol; therefore most network sockets are Internet sockets.

A socket API is an application programming interface (API), usually provided by the operating system, that allows application programs to control and use network sockets. Internet socket APIs are usually based on the Berkeley sockets standard.

A socket address is the combination of an IP address and a port number, much like one end of a telephone connection is the combination of a phone number and a particular extension. Based on this address, internet sockets deliver incoming data packets to the appropriate application process or thread.

Hope you enjoy the tutorial in which we create a socket for communications using the http protocol to a host of your choosing … we chose google.com … you will need to have your internet connection working and check that the firewall settings allow port 80 to communicate with a socket. In this tutorial we establish a socket and make a request and receive a response. In practice you would continue on with more sophistication.

Here is some downloadable C# programming source code which you might want to rename to Program.cs

The Socket Class tutorial was used and amended only slightly for this tutorial, so please start here on the path to further examination of this very interesting and fundamental area of network programming.

Link to Socket information from Wikipedia, from where the quote above came.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, OOP, Software, Tutorials, Visual Studio and tagged , , , , , , , , , , , . Bookmark the permalink.

9 Responses to Visual Studio C# NUnitTest Primer Tutorial

  1. When visiting blogs, i generally discover a really excellent content material like yours

  2. webpage says:

    Extremely excellent post, thank you a lot for sharing. Do you’ve an RSS feed I can subscribe to?

  3. Service says:

    of course, research is having to pay off. I value you giving out your perspective.. Isn’t it excellent whenever you obtain a great publish? I enjoy you writing your viewpoint..

  4. Beautiful says:

    Truly appreciate the admission you available.. indeed, investigation is paying off. Terrific thought processes you possess here.. yes, study is paying off.

  5. I savor, lead to I discovered exactly what I was having a look for. You have ended my four day long hunt! God Bless you man. Have a great day. Bye|

  6. Extra says:

    I as well as my friends have already been analyzing the best guides from your web blog and then immediately I had an awful suspicion I had not thanked the blog owner for those secrets. All of the men were so passionate to learn all of them and already have simply been enjoying those things. I appreciate you for getting really kind and then for figuring out these kinds of essential ideas most people are really eager to learn about. My very own honest regret for not expressing gratitude to you earlier.

  7. favorite says:

    You are my breathing in, I own few web logs and often run out from to post .

  8. bat control says:

    really informative

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>