Trisha Gee

Lead Java Advocate

Logo
Postfix Completion
Postfix completion allows you to keep typing forwards, it minimises the amount of time you spend moving the cursor around while you're coding.
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
Helper Methods
Sometimes we need to move test code into a separate method. In this section, we look at some tips for this.
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
Shortcuts used
Finally, let's summarise the shortcuts we've learnt and see links to further information.
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.
Logo
With
Sometimes we want to check more than one value on an object. We can use `with` to do this.