Click here to Skip to main content
15,845,829 members
Everything / DevOps / Unit Testing

Unit Testing


Great Reads

by Fred Song (Melbourne)
Angular 7 with .NET Core 2.2 - Global Weather
by Anton Angelov
Code samples in C# how to assert DateTime with delta. Write your own Validator for MSTest or use built-in methods in NUnit.
by Naveen Kosana
Learn how to write unit test cases using Jasmine framework for Angular Controllers
by Łukasz Bownik
The article describes an alternative approach to unit testing.

Latest Articles

by Daan Acohen
Boost your xUnit tests with detailed logging for clearer insights and easier debugging.
by Łukasz Bownik
The article describes an alternative approach to unit testing.
by Daan Acohen
Explains how to do multiple assertions using the Fluent Assertions library, without multiple validation lines

All Articles

Sort by Score

Unit Testing 

9 Apr 2019 by Fred Song (Melbourne)
Angular 7 with .NET Core 2.2 - Global Weather
18 Feb 2017 by Naveen Kosana
Learn how to write unit test cases using Jasmine framework for Angular Controllers
9 Oct 2023 by Łukasz Bownik
The article describes an alternative approach to unit testing.
18 Oct 2012 by Indranil Pal
Mocking database in Unit Tests using Moq.
29 Feb 2016 by Alexandr Surkov
My experience of using C++ with microcontrollers
19 Oct 2018 by Sean Rand
Getting the most from your test runner
21 Jan 2013 by Simeon Sheye
Beyond basic unit tests, how do you choose your tests and when are you done?
20 Sep 2020 by F-ES Sitecore
A discussion of what to unit test in your C# code and how to test it, including a section covering MVC
11 Mar 2012 by Andreas Gieriet
How to define RelationAssert as an extension to the VisualStudio Assert class.
10 Feb 2013 by Enrique Albert
Pattern to follow using mock frameworks so non public methods can be tested. The code example is based on the RhinoMock framework but it is easily applicable to any other mock framework.
21 Jan 2014 by Ashley Davis
Documents my experiment building a flowchart with web technologies.
11 Mar 2020 by Vassili Kravtchenko-Berejnoi
Use of a narrow-focus strategy in test-driven-development
19 Sep 2012 by David Bywaters
Two approaches for unit testing Entity Framework
6 Jan 2021 by Łukasz Bownik
A simple method to estimate the quality of a unit test suite that can give some insight into the subject beyond regular test coverage.
9 May 2014 by Halil ibrahim Kalkan
An implementation of dependency injection, repository and unit of work patterns using Castle Windsor and NHibernate.
27 Dec 2012 by WebMaster
Mockito is a mocking framework that tastes really good. It lets you write beautiful tests with clean & simple API.
20 Jun 2012 by Henning Dieterichs
This article introduces a library for handling units of measure.
21 Jan 2013 by Simeon Sheye
How to manage state and simulate behavior against the system under test.
16 Dec 2013 by Seckin Tozlu
How to create a comprehensive test suite for your API
5 Jun 2013 by Lukasz Szyrmer
Use cost of market delay and your learning costs to figure out whether TDD, or its alternatives, makes sense for you
8 Nov 2015 by Michael Pan
Presenting techniques for effective usage of Google unit test frameworks in embedded environment.
20 Nov 2016 by Sibeesh Passion
How to write unit test cases for our WCF Service with a framework called NUnit
5 Jan 2020 by Paulo Zemek
I partially agree with the basic idea, but it fails when we need to deal with an issue no unit-test caught and the good developers and code-reviewers simply can't understand what's going on.
11 Oct 2013 by ASP.NET Community
ASP.NET MVC: How to start Unit TestingWhy Unit Testing?Why should you write Unit Tests? Here are some points which are mostly mentioned if
14 May 2014 by Marla Sukesh
In this article we will learn how to perform Unit Testing in Asp.Net MVC
21 Nov 2016 by onqtam
Intro to testing framework, what makes it unique and points about its capabilities
23 Jun 2014 by Ehsan.MA
Information on how to use UnitConversionLib in C# for changing units and quantities
9 Feb 2016 by Manfredzik
Write your own simple generic mapper with TDD
13 Jun 2016 by Roger C Moore
MVVM Silverlight app with EF and WCF Service
21 Nov 2013 by Ralph Varjabedian
With one function call, wrap a class with a proxy in Javascript. A precursor to easy error mocking in node.js using mocha
8 Nov 2018 by DMEvans
A discussion of three options for the creation of simple .NET types without affecting the testability of your class
8 May 2017 by Habibur Rony
BDD, AAA Structure And Object Mocking in Unit testing
27 Nov 2013 by Mahmud Hasan
The only good thing of Test Driven Development is, it ensures the maximum test coverage but TDD puts you in risk of a week design. DTDT tries to solve this while ensuring maximum test coverage.
11 May 2014 by Giovanni Scerra
Discussion on the root causes of failure when undertaking code refactoring
8 Feb 2018 by RahulMittal2018
SQL unit testing with SQL Server data tools (SSDT)
28 Nov 2013 by James Coleman
Leveraging Selenium and Image Magick to perform screenshot comparisons for UI regression testing.
12 Jun 2014 by _Noctis_
Different ways of achieving unit testing for your projects
28 Jul 2019 by Adam Tibi
One of the MVC mantras is that it allows unit testing your controllers. But, that doesn't mean you should. In my opinion, you should focus your unit testing valuable effort in more effective areas as the controller, if done right, doesn't require unit testing.
20 Dec 2015 by Anup Raghavendra Hosur
In this article we will be discussing about unit testing and Rhino Mocks
13 May 2016 by DannyFreeman
Writing unit tests for a deep clone method
28 Jun 2016 by mvastarelli
How to organize unit-tests within a library without the need for a separate test library.
15 Aug 2022 by DiponRoy
How to delete all rows in EF Core 6 using alternate options