# # test/unit/bio/db/test_gff.rb - Unit test for Bio::GFF # # Copyright (C) 2005 Mitsuteru Nakao # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: test_gff.rb,v 1.4 2005/12/19 01:21:42 k Exp $ # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s $:.unshift(libpath) unless $:.include?(libpath) require 'test/unit' require 'bio/db/gff' module Bio class TestGFF < Test::Unit::TestCase def setup data = <'"Chromosome I Centromere"', "Gene"=>'"CEN1"'} assert_equal(at, @obj.attributes) end def test_comments assert_equal(nil, @obj.comments) end end # class TestGFFRecord class TestGFFRecordConstruct < Test::Unit::TestCase def setup @obj = Bio::GFF.new end def test_add_seqname name = "test" record = Bio::GFF::Record.new("") record.seqname = name @obj.records << record assert_equal(name, @obj.records[0].seqname) end end # class TestGFFRecordConstruct end