In the previous episode of the Moose tutorial we saw how to declare a type-constraint, and what happens if we call a setter with a value that does not pass this type-checking.

This time we'll write formal tests for these cases. Especially interesting how to test that the class indeed throws the exception when it receives values that don't pass the type-checking.

At first it might be a bit strange that we test if there was an exception, but this exception is part of the API of the module. We want to make sure that even if the implementation of the module changes, it will still throw an exception.