April 14, 2012 82% of Perl Testing Back

Testing Alpha::get_name()

        $expected = 'Sylvester';
        $self = Alpha->new( {
            name    => $expected,
            string  => 'some string',
        } ); 
        ok($self, "Alpha->new() returned true value");
        $got = $self->get_name();
        is( $got, $expected, "get_name() returned '$expected' as expected" );


Home Last TOC Copyright © 2012 James E Keenan Back Next