Testing

Creating and running tests for your code.

You can use IntelliJ IDEA to help you create and run tests across your project.

Logo
Data Pipes
Often we want to test the same set of criteria with different sets of data. Data pipes is one mechanism to do this.
Logo
Data Tables
Data tables offer the same functionality as data pipes, but this syntax can sometimes be more readable for more complex sets of data.
Logo
Mocks
Mocks are a useful testing tool. We can provide "empty" objects, so we don't have to initialise the whole application to test a section, and we can use mocks to check our code is making the calls we expect.
Logo
Stubs
Stub objects allow us to state from a test what values get injected into our application code. They can provide simple interfaces, so we don't have to initialise the whole application to test a section.
Logo
Verify All
Test frameworks often stop the test at the first failure. Find out how to run all conditions to see which pass and which fail.