Automating The Arrange Phase With AutoFixture

In a previous article, we refactored a unit test in two ways. The builder and fixture patterns encapsulated an object’s creation, which simplified the arrange phase of a unit test. These two patterns produced a lot of boiler-plate code. It would be nice to never have to create an arrange phase in the first place. AutoFixture tries to produce unit tests with no arrange phase. As the AutoFixture GitHub page describes:...

November 2, 2017 · 3 min · 479 words · Jack Histon

MSBuild Maintenance Made Easy With Shared Properties

The New MSBuild MSBuild is the build engine for .NET and Visual Studio. It is written in such a way to be composable, allowing you to combine project files. If you have ever used Visual Studio, then you have indirectly used MSBuild. When you open Visual Studio, it is using MSBuild to restore, build, and manage your projects. Recently, a new version of MSBuild has hit the streets. This came out along with Visual Studio 2017, and has changed design....

October 12, 2017 · 3 min · 584 words · Jack Histon

2 Simple Ways To Improve Your Unit Tests

Over the past 20 years, testing has become a cornerstone of software development. To turn software development into a true profession, we need to create robust, secure, safe, and efficient systems. The simplest tool in our toolbox starts us on this road: the unit test. Like an accountant, the unit test is a fantastic way for us to perform double-entry bookkeeping. The unit test double checks our work is correct, and makes sure we keep it from morphing into something we did not want....

October 3, 2017 · 4 min · 825 words · Jack Histon

Trust Your Data, Not Your Mind

When you add decor to your home, previous decor can look worse. You paint one wall a bright blue, but at the same time, the shine of the wall next to it dulls a little. Your codebase is a never-ending cycle of refactoring. Small improvements to one part, makes you see small improvements for another part. Shining a light on a piece of your code, shines problems on code around it....

September 27, 2017 · 6 min · 1241 words · Jack Histon