Impure functions are difficult to test because they rely on direct and indirect input. Test doubles, like those provided by NSubstitute, can be overridden to return the values and verify the behavior you expect.
Writing unit tests for Unity input code is hard because Unity’s Input class is static. In this video I’m going to show you two techniques that’ll make unit testing with Unity’s time and input APIs much easier: The Humble Object Pattern and Depencency Injection.
In this video we’ll be adding Test Data Builders to our test suite. The result will be better unit tests that are maintainable and easy to read.
In this post we’ll be creating a Unity editor window that performs some pretty basic Unity terrain generation using a configurable heightmap texture.
In part 4 we’ll make progress by exposing some state information on the Heart class and chipping away at the implementation of the HeartContainer’s Replenish method.
Unit testing Unity code can pretty challenging at first. But learning how to unit test your game code is a valuable skill that every game developer should have in their toolkit.
Welcome to part 3 of Test-Driven Development in Unity! In this video we’ll look at unit tests with multiple collaborators.
Part two of my Test-Driven Development in Unity in series, where we’ll be implementing a heart based health system much like the one found in the Zelda franchise.
Welcome to the first post in a video series I call Test-Driven Development in Unity. Over the course of this series we will be implementing the Life Gauge from Zelda: Breath of the Wild.
tl;dr – Unit testing business logic builds confidence in your code, fosters change, and supplies a way to passively create documentation.
When you first start unit testing you want to write tests for everything. New applications are easy because you can simply perform test driven development to guide the process. But writing a test suite for a legacy application can be pretty daunting.