# To change this template, choose Tools | Templates # and open the template in the editor. # loading helper routine for testing bioruby require 'pathname' load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'bioruby_test_helper.rb')).cleanpath.to_s # libraries needed for the tests require 'test/unit' require 'bio' module Bio class TestBiosqlIO < Test::Unit::TestCase def setup @connection = Bio::SQL.establish_connection({'development'=>{'hostname'=>'localhost','database'=>"bioseq", 'adapter'=>"jdbcmysql", 'username'=>"febo", 'password'=>nil}},'development') @str_genbank=<Bio::GenBank.new(@str_genbank).to_biosequence, :biodatabase=>Bio::SQL::Biodatabase.find(:first)) assert_not_nil(@@x) end def test_03_input_output bioseq = Bio::SQL.fetch_accession("X64011") assert_not_nil bioseq assert_equal(@str_genbank, bioseq.to_biosequence.output(:genbank)) end def test_04_bioentry_data_format assert_equal('26-SEP-2006', @@x.date_modified.to_s) end def test_05_title assert_equal('Cloning of a superoxide dismutase gene from Listeria ivanovii by functional complementation in Escherichia coli and characterization of the gene product',@@x.references.first.title) end def test_99_delete_bioentry assert_not_nil(@@x.delete) end end end