2016-10-15 16:26:56 +00:00
|
|
|
defmodule RDF.TripleTest do
|
2017-06-16 22:44:11 +00:00
|
|
|
use RDF.Test.Case
|
2016-10-15 16:26:56 +00:00
|
|
|
|
2017-04-10 01:06:20 +00:00
|
|
|
doctest RDF.Triple
|
2018-10-21 22:52:22 +00:00
|
|
|
|
|
|
|
alias RDF.Triple
|
|
|
|
|
|
|
|
describe "values/1" do
|
|
|
|
test "with a valid RDF.Triple" do
|
|
|
|
assert Triple.values({~I<http://example.com/S>, ~I<http://example.com/p>, RDF.integer(42)})
|
|
|
|
== {"http://example.com/S", "http://example.com/p", 42}
|
|
|
|
end
|
|
|
|
|
|
|
|
test "with an invalid RDF.Triple" do
|
|
|
|
refute Triple.values({~I<http://example.com/S>, ~I<http://example.com/p>})
|
|
|
|
refute Triple.values({self(), self(), self()})
|
|
|
|
end
|
|
|
|
end
|
2016-10-15 16:26:56 +00:00
|
|
|
end
|