Getting started with xUnit

Russell Hammett Jr. (Kritner)
6 min readNov 28, 2018
Photo by Max Nelson on Unsplash

I’ve worked with MSTest and NUnit previously, but for whatever reason not with xUnit. Thankfully, coming from either framework seemed to translate pretty easily into xUnit.

In the recent post I did:

I explored working with xUnit for the first time, to help to ensure the extension methods I was implementing were working as I intended. Though I had written previously about the extension methods, I hadn’t covered the testing of them; I thought that deserved its own post.

What is unit testing?

If you’ve never worked with unit testing before, wikipedia describes them as:

In computer programming, unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.[1]

The way I usually describe it is: unit testing is the process of ensuring expected outcomes from a piece of code — ideally a single function —…

--

--

Russell Hammett Jr. (Kritner)

Just a boring Application Developer/Dad. I enjoy gaming, learning new technologies, reading, and potentially other stuff. That’s about it.