diff options
author | gebele <gebele@in-silico.ch> | 2012-04-19 18:07:06 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2012-04-19 18:07:06 +0200 |
commit | e4d0118c50542e0c52356c60a829b6a46f204865 (patch) | |
tree | 3ba23f26223f14753ca008fec57e76e852aa4216 | |
parent | da91f344082075fde4afe2db89786aba645fe2c7 (diff) |
inspect rdf content
-rw-r--r-- | test/rdf_check.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/rdf_check.rb b/test/rdf_check.rb new file mode 100644 index 0000000..a321154 --- /dev/null +++ b/test/rdf_check.rb @@ -0,0 +1,35 @@ +require File.join(File.expand_path(File.dirname(__FILE__)),"setup.rb") + +class UploadTest < Test::Unit::TestCase + + def setup + end + + def teardown + end + + def test_01_query_sparqle_rdf + id = OpenTox::Authorization.authenticate($aa[:user],$aa[:password]) + #test_all + response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/`.chomp + assert_match /DoseResponse-Trial/, response + assert_match /Investigation/, response + assert_match /BII-I-1/, response + #test_id_query_sparqle + response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0`.chomp + assert_match /TB-DoseResponseTrial-acetaminophen/, response + #test_metadata_query_sparqle + response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/metadata`.chomp + assert_match /DoseResponse-Trial/, response + #test_resource_ISA_Investigation + response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/ISA_1879`.chomp + assert_match /[Person, User, Contact]/, response + #test_resource_Study + response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/S1887`.chomp + assert_match /A451/, response + #test_resource_Assay + response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/A451`.chomp + assert_match /Assay/, response + end + +end |