| 1 | require 'test/unit' |
| 2 | require 'rdf/redland' |
| 3 | |
| 4 | include Redland |
| 5 | |
| 6 | |
| 7 | class TestStorage < Test::Unit::TestCase |
| 8 | def test_initialize() |
| 9 | store = TripleStore.new('memory','mystore') |
| 10 | assert_instance_of(TripleStore,store) |
| 11 | assert_raises(RedlandError,'Should raise exception'){ |
| 12 | store2 = TripleStore.new('bogus','thestore') |
| 13 | } |
| 14 | assert_raises(RedlandError){ |
| 15 | store3 = TripleStore.new('hash','thefile') |
| 16 | } |
| 17 | |
| 18 | end |
| 19 | |
| 20 | |
| 21 | end |
| 22 | |
| 23 | class TestHash < Test::Unit::TestCase |
| 24 | def test_initialize |
| 25 | store = HashStore.new() |
| 26 | assert_instance_of(HashStore, store) |
| 27 | assert_equal('hashes',store.store_type) |
| 28 | assert_equal('memory',store.hash_type) |
| 29 | assert_raises(RedlandError,'should raise exception'){ |
| 30 | store = HashStore.new('bdb') |
| 31 | } |
| 32 | end |
| 33 | |
| 34 | def test_bdb_hash |
| 35 | store = HashStore.new('bdb','thestore') |
| 36 | |
| 37 | end |
| 38 | |
| 39 | |
| 40 | end |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 |