7 use SGN::Test::WWW::Mechanize skip_cgi => 1;
9 # this thing is really basically a controller, so will test it like
11 use_ok 'CXGN::Bulk::UnigeneConverter';
13 my $mech = SGN::Test::WWW::Mechanize->new;
14 $mech->with_test_level( local => sub {
16 my $tempdir = File::Temp->newdir;
18 $params->{idType} = "unigene_convert";
19 $params->{ids} = "SGN-U243120 SGN-U243522";
20 $params->{dbc} = $mech->context->dbc->dbh;
21 $params->{tempdir} = "$tempdir";
23 # Testing constructor.
24 my $bulk = CXGN::Bulk::UnigeneConverter->new($params);
26 is($bulk->{idType}, "unigene_convert", "idType ok");
27 is($bulk->{ids}, "SGN-U243120 SGN-U243522", "id input string ok");
29 # Testing process_parameters method.
30 my $pp = $bulk->process_parameters();
32 is($pp, 1, "parameters are ok (process_parameters returned 1)");
34 is_deeply( $bulk->{ids}, [243120, 243522], "id list is ok" );
36 # Testing process_ids method.