chapter12 unit tests for directives