Sha256: 7d4b086a676628d48c8944ce153713cdf2ebfa3703e71a3d849ba6c4e2c0d6a5
Contents?: true
Size: 1.05 KB
Versions: 4
Compression:
Stored size: 1.05 KB
Contents
$:.unshift File.join(File.dirname(__FILE__), "..", "lib") require 'dowl' require 'test/unit' class OntologyTest < Test::Unit::TestCase def setup file = "examples/example.ttl" @schema = DOWL::Schema.create_from_file(File.expand_path(file)) end def test_get_title assert_equal( "An Example", @schema.ontology.title ) end def test_get_comment assert_equal( "This is a simple example", @schema.ontology.comment ) end def test_get_created assert_equal( "2010-02-19", @schema.ontology.created ) end def test_get_created assert_equal( "2010-09-28", @schema.ontology.modified ) end def test_get_authors assert_equal( 2 , @schema.ontology.authors.length ) author = @schema.ontology.authors[0] assert_equal( "http://www.ldodds.com#me", author.uri ) assert_equal( "Leigh Dodds", author.name ) author = @schema.ontology.authors[1] assert_equal( "http://www.example.org/unknown", author.uri ) assert_equal( "http://www.example.org/unknown", author.name ) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dowl-0.7 | tests/tc_ontology.rb |
dowl-0.6 | tests/tc_ontology.rb |
dowl-0.5 | tests/tc_ontology.rb |
dowl-0.2 | tests/tc_ontology.rb |