Author image Tony Byrne
and 1 contributors

NAME

Test::C2FIT::PrimitiveFixture

SYNOPSIS

Normally, you subclass PrimitiveFixture.

        sub doCell
        {
                my $self = shift;
                my($cell, $column) = @_;

                if ( $column == 0 ) {
                        $self->{'x'} = int($cell->text());
                } elsif ( $column == 2 ) {
                        $self->checkValue($cell, $self->{'x'} * $self->{'x'};
                }
        }

DESCRIPTION

PrimitiveFixture offers a checkValue method. Binding of columns to values is the programmer's job with this fixture.

METHODS

checkValue($cell,$value)

Checks if the given cell contains something which equals to value. If so, the cell gets annotated as "right", else as "wrong".

SEE ALSO

Extensive and up-to-date documentation on FIT can be found at: http://fit.c2.com/