Mocking describes a feature in programming that allows you to replace the functionality of an object with a blank version of itself or provide your own functionality in its place.
Lets take a look at building an abstraction over a character controller in our 2D platforming game. The goal of this refactoring and abstraction pattern is to improve the testability and modularity of the character controller.
I’ve been trying to replace the old World of Zero website for a while now. A beta of the new version is finally in a working state and I’d love for you all to check it out!
Lets explore this new health tracking component we’ve built by introducing the Unity Test Runner to our project. The Unity Test Runner allows you to add a variety of NUnit tests to your project that allow you to create Edit and Play mode tests.
Testing code is important. It ensures that the code you just wrote works, but more importantly it serves as documentation about exactly what your code does and ensures that after months of maintenance and changes that the code you haven’t touched in months still does what you think.