BEGIN;
    -- Load the TAP functions.
    CREATE EXTENSION pgtap;
    SET client_min_messages TO warning;

    -- Plan the tests.

    SELECT plan(8);

    -- Add data

    \i xt/data/42-pg/Base.sql

    -- Validate required tables

--    SELECT has_table('business');

    -- Validate required functions

    SELECT has_function('timecard__get',ARRAY['integer']);
    SELECT has_function('timecard__save',ARRAY['integer','integer','integer','text','numeric','numeric','numeric','numeric','text','timestamp with time zone','timestamp with time zone','integer','text','numeric','numeric','character','integer']);
    SELECT has_function('timecard__bu_class',ARRAY['integer']);
    SELECT has_function('timecard__parts',ARRAY['boolean','boolean','text']);
    SELECT has_function('timecard__report',ARRAY['integer[]','text','integer','date','date','boolean','boolean','integer']);
    SELECT has_function('timecard__allocate',ARRAY['integer','numeric']);
    SELECT has_function('timecard_type__get',ARRAY['integer']);
    SELECT has_function('timecard_type__list','{}'::text[]);

    -- Run tests

--    PREPARE test AS select ...;
--    SELECT results_eq('test',result,'Description');
--    DEALLOCATE test;

    -- Finish the tests and clean up.
    SELECT * FROM finish();

ROLLBACK;
