NUnit is an open source unit testing framework for Microsoft .NET and Silverlight written in C#. It serves the same purpose as JUnit does in the Java world, and is one of many in the xUnit family.

learn more… | top users | synonyms

3
votes
1answer
51 views

Unit testing a service to return items from a database

I have been a developer for many years and get core development concepts, as well as unit testing ones such as DI/Ioc, Mocking etc. I also understand the values, importance of unit testing and writing ...
4
votes
1answer
58 views

Unit testing a CharGrid

I wrote NUnit tests for class CharGrid from this homework assignment. My goal here is DRY: I want to keep the testing code as short and simple as possible. In addition, want to run every test ...
4
votes
2answers
79 views

TDD - String Calculator Kata

Would really appreciate it if someone could please review my String Calculator TDD KATA. String Calculator Create a simple String calculator with a ...
3
votes
3answers
155 views

TDD Supermarket Pricing Kata

I have done the supermarket pricing kata in TDD style and I would appreciate it if someone could review it for me. Kata: "...checkout that calculates the total price of a number of items. In ...
2
votes
3answers
330 views

String Calculator Kata Code in TDD style

I have done the following kata in TDD style and would appreciate it if someone could review my code and my tests. String Calculator Create a simple ...
6
votes
4answers
181 views

Unit testing IValueConverter

I am just starting to implement unit testing into my project and familiarizing myself with NUnit. I have added unit tests for encryption/decryption methods that I have implemented, and am looking for ...
2
votes
1answer
29 views

Structuring Test Data

I'm just getting started with F# and was writing some unit tests for some functionality I had written. In the interest of brevity, I decided to create some lists of the different test cases and just ...
3
votes
2answers
100 views

Correct way to cover dependencies in unit tests

My approach to unit testing feels very wrong. I feel like I am missing something very basic, and I'm looking for some insight please. Let's assume that I am testing a method (I'm using NUnit) that ...
5
votes
2answers
204 views
2
votes
1answer
59 views

Multiple Services and Test Setup

Class To Test Some methods hidden for clarity ...
8
votes
2answers
163 views

Testing classes

I'm just getting into testing and wanted to see if someone can tell me if I'm writing tests correctly. I'm using C#, NUnit, & Should. This is the class I'm testing: ...
4
votes
2answers
5k views

REST Web Api unit test endpoint validity with NUnit and Moq

I am unit testing that the URL that I give to my IRestClient is valid. This client talks to a third party Web API. The test is as below: ...
2
votes
1answer
720 views

Testing database table creation with NUnit

I'm new to using NUnit and have written a test to check for the existence of a database table. I have the below code that should check whether a new table named NewTable has been created in the ...
6
votes
4answers
5k views

Function for determining triangle type?

A while back I was asked to write some sample code for a job that I was applying for. They wanted a class that had a function that would accept three lengths and return the appropriate type of ...