package PS::MOPS::DC::Test::Unit::Fields;

## @class PS::MOPS::DC::Test::Unit::Fields
#
# @par DESCRIPTION
# Unit tests for PS::MOPS::DC::Field module. This module serves as an
# interface to the lower-level testing code. The functions in this module
# correspond to the tests called by the testing system. All tests are intended
# to return 1 for success or 0 for failure.

use strict;
use warnings;
our $VERSION = sprintf "%d", q$Revision: $ =~ /(\d+)/g;

use PS::MOPS::DC::Test::Fields;
use PS::MOPS::DC::Test::Unit::Globals qw($g_TEST_INSTANCE
                                         $g_FIELDS
                                         $g_NUM_TEST_FIELDS);

sub test_new
{
    return($g_FIELDS->make_test_fields_all()==1);
}

sub make_test_fields__simple
{
    $g_FIELDS=PS::MOPS::DC::Test::Fields->new(instance=>$g_TEST_INSTANCE,
                                              num_fields=>$g_NUM_TEST_FIELDS);
    return 1 if($g_FIELDS); # @todo Add test for correct Fields object.
    return 0;
}

sub test_insert
{
    return($g_FIELDS->test_insert_fields_all()==1);
}

sub test_modcf_retrieve
{
    return($g_FIELDS->test_retrieve_fields_all()==1);
}

sub test_delete
{
    return $g_FIELDS->test_delete_fields_all();
}

sub test_status
{
    return($g_FIELDS->test_update_status_all()==1);
}

1;
