Skip to content
Snippets Groups Projects
Commit 26443da4 authored by Graham McVicker's avatar Graham McVicker
Browse files

added tests for DBEntryAdaptor fetch_by_dbID and fetch_by_db_accession methods

parent 650d7375
No related branches found
No related tags found
No related merge requests found
......@@ -288,3 +288,29 @@ ok($features->[0]->start == 19 &&
$features->[2]->start == 35 &&
$features->[2]->end == 44);
#
# test DBEntryAdaptor::fetch_by_db_accession and
# DBEntryAdaptor::fetch_by_dbID
#
$xref = $dbEntryAdaptor->fetch_by_dbID(152202);
ok($xref->dbID == 152202);
ok($xref->display_id() eq 'C20orf125');
ok($xref->dbname() eq 'HUGO');
ok($xref->primary_id() eq '16118');
$xref = $dbEntryAdaptor->fetch_by_db_accession('Interpro', 'IPR000010');
ok($xref->dbID == 999999);
ok($xref->description eq 'Test interpro desc2');
$multi->hide('core', 'xref');
#make sure this still works when interpro entries missing in xref table
$xref = $dbEntryAdaptor->fetch_by_db_accession('Interpro', 'IPR000010');
ok($xref);
ok($xref->primary_id() eq 'IPR000010');
$multi->restore('core', 'xref');
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment