Starting TDD: Arrange-Act-Assert
Learn how TDD is involved in following the Arrange-Act-Assert pattern to structure tests effectively.
Unit tests
Unit tests are nothing mysterious. They’re just code, executable code written in the same language that we write our application in. Each unit test forms the first use of the code we want to write. It calls the code just as it will be called in the real application. The test executes that code, captures all the outputs that we care about, and checks that they are what we expected them to be. Because the test uses our code in the exact same way that the real application will, we get instant feedback on how easy or difficult our code is to use.
Get hands-on with 1400+ tech skills courses.