# File test/test_model.rb, line 94 def testcontext() store = HashStore.new('bdb','thestore') model = Model.new(store) model.add_statement(Statement.new(Uri.new('http://example.org/dom'),Uri.new('http://example.org/project'),'10892'),Node.new(Uri.new('http://example.org/mycontext/dom'))) model.add(Uri.new('http://example.org/dom'),Uri.new('http://example.org/name'),'Dominic',Uri.new('http://example.org/mycontext/dom')) #model.statements(){|s| puts s} contexts = [] model.contexts{|c| contexts << c} assert_equal(1,contexts.size) #assert_equal(contexts[0],model.create_resource('http://mycontext/dom')) #model.add(Uri.new('http://example.org/dom'),Uri.new('http://example.org/surname'),'Sisneros',Uri.new('http://newcontext/dom')) #contexts = model.contexts() #puts "## CONTEXTS ARE #{contexts}" #assert_equal(2,contexts.size) end