7 use SGN::Test::Fixture;
8 use CXGN::BreederSearch;
11 my $f = SGN::Test::Fixture->new();
13 my $bs = CXGN::BreederSearch->new( { dbh=> $f->dbh() });
21 my $results = $bs->metadata_query($criteria_list, $dataref, $queryref);
22 print STDERR Dumper $results;
43 }, 'wizard one category query');
60 $results = $bs->metadata_query($criteria_list, $dataref, $queryref);
68 }, "wizard two category query" );
77 'locations' => '\'23\'',
87 $results = $bs ->metadata_query($criteria_list, $dataref, $queryref);
103 }, "wizard three category query");
109 'genotyping_protocols'
112 'genotyping_protocols' => {
113 'trials' => '\'139\'',
114 'locations' => '\'23\'',
115 'years' => '\'2014\''
119 'genotyping_protocols' => {
125 $results = $bs ->metadata_query($criteria_list, $dataref, $queryref);
126 is_deeply($results, {
130 'GBS ApeKI genotyping v4'
133 }, "wizard four category query");
142 'trials' => '\'139\',\'141\'',
143 'breeding_programs' => '\'134\''
149 'breeding_programs' => 0
152 $results = $bs ->metadata_query($criteria_list, $dataref, $queryref);
153 is_deeply($results, {
157 'dry matter content percentage|CO_334:0000092'
161 'fresh root weight|CO_334:0000012'
165 'fresh shoot weight measurement in kg|CO_334:0000016'
168 }, "wizard intersect query");
177 'trials' => '\'137\'',
178 'accessions' => '\'38840\',\'38841\''
187 $results = $bs ->metadata_query($criteria_list, $dataref, $queryref);
188 is_deeply($results, {
190 }, "wizard 0 results error query");
199 'trials' => '\'137\', \'139\', \'141\''
207 $results = $bs ->metadata_query($criteria_list, $dataref, $queryref);
208 is(scalar(@{$results->{'results'}}), 254, "wizard min match query");