| 1 |
require 'test/unit' |
| 2 |
require 'rdf/redland' |
| 3 |
require 'rdf/redland/node' |
| 4 |
|
| 5 |
|
| 6 |
class TestStatement < Test::Unit::TestCase |
| 7 |
include Redland |
| 8 |
|
| 9 |
def test_initialize() |
| 10 |
st = Statement.new(Uri.new("http://foo"),Uri.new("http://bar"),"baz") |
| 11 |
assert_instance_of(Statement,st) |
| 12 |
|
| 13 |
assert_equal(Node.new(Uri.new("http://foo")),st.subject) |
| 14 |
assert_equal(Node.new(Uri.new("http://bar")),st.predicate) |
| 15 |
assert_equal('baz',st.object.to_s) |
| 16 |
st.subject = Node.new(Uri.new("http://xmlns.com" )) |
| 17 |
st.predicate = Node.new( Uri.new("http://xmlns.com/#name")) |
| 18 |
st.object = Node.new("Dominic") |
| 19 |
end |
| 20 |
end |