Refactored test-cases using scenario outlines.

This hopefully makes the tests more readable and easier to change, whilst providing better and more explicit coverage.