new api version
[Biblio-Isis] / t / 002_isis.t
index 3b93a0a..6594491 100755 (executable)
@@ -17,7 +17,7 @@ sub test_data {
 
        isa_ok ($isis, 'IsisDB');
 
-       cmp_ok($isis->{maxmfn}, '==', 5, "maxmfn set to 5");
+       cmp_ok($isis->count, '==', 5, "count is 5");
 
        # test .CNT data
 
@@ -92,7 +92,7 @@ sub test_data {
                '200' => [ '1#^aPsychology^fCamille B. Wortman, Elizabeth F. Loftus, Mary E. Marshal' ],
        } ];
                
-       foreach my $mfn (1 .. $isis->{'maxmfn'}) {
+       foreach my $mfn (1 .. $isis->count) {
                my $rec;
                ok($rec = $isis->fetch($mfn), "fetch $mfn");
 
@@ -113,7 +113,7 @@ sub test_data {
 
                skip "no Digest::MD5 module", 5 if ($@);
 
-               foreach my $mfn (1 .. $isis->{'maxmfn'}) {
+               foreach my $mfn (1 .. $isis->count) {
                        my $md5 = md5_hex($isis->to_ascii($mfn));
                        cmp_ok($md5, 'eq', $args->{md5_ascii}[$mfn - 1], "md5 $mfn");
                }