summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2012-04-20 10:32:17 +0200
committergebele <gebele@in-silico.ch>2012-04-20 10:32:17 +0200
commit1fa53ac290b5314ba21b9004b517a89bad0e9366 (patch)
tree7e96eb63e416fd39d9ceaa50fbb6117a99dfca3a
parent244dc8b268403b7fc265c317ff294e488ff55218 (diff)
test E_MTAB
-rw-r--r--test/rdf_check.rb39
1 files changed, 35 insertions, 4 deletions
diff --git a/test/rdf_check.rb b/test/rdf_check.rb
index 58eecf1..82e1554 100644
--- a/test/rdf_check.rb
+++ b/test/rdf_check.rb
@@ -16,6 +16,9 @@ class UploadTest < Test::Unit::TestCase
#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 /[title, Manchester, givenname, Castrillo]/, response
+ #test_resource_ISA
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/ISA_3981`.chomp
+ assert_match /[givenname, Castrillo, family\_name, Juan]/, 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 /[I2225, BII\-I\-1, S2223, S2224, Growth, Background]/, response
@@ -24,16 +27,44 @@ class UploadTest < Test::Unit::TestCase
assert_match /[BII\-I\-1, title, Growth, abstract, Background]/, response
#test_resource_Study
response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/S2223`.chomp
- assert_match /[hasProtocol, P\_2202, description, Comprehensive, title, rapamycin, Rapamycin, Affymetrix]/, response
+ assert_match /[hasAssay, A1269, hasProtocol, P\_2202, description, Comprehensive, title, rapamycin, Rapamycin, Affymetrix]/, response
#test_resource_Assay
response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/A1269`.chomp
+ #TODO fix Assay content
assert_match /Assay/, response
#test_resource_Protocol
response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/P_2202`.chomp
assert_match /[mRNA, extraction]/, response
+ end
+ def test_02_query_sparqle_rdf_E_MTAB
+ 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 /[https\:\/\/toxbanktest2, https\:\/\/toxbank\-dev]/, response
+ #test_id_query_sparqle
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/2`.chomp
+ #TODO fix givenname
+ assert_match /[title, EMBL\-EBI, hasStudy, S2008, hasMember, ISA_60553]/, response
#test_resource_ISA
- response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/0/ISA_3981`.chomp
- assert_match /[givenname, Castrillo, family\_name, Juan]/, response
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/2/ISA_60553`.chomp
+ assert_match /[givenname, Ruth, family\_name, Akhtar]/, response
+ #test_metadata_query_sparqle
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/2/metadata`.chomp
+ assert_match /[I2]/, response
+ #test_resource_Investigation
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/2/I2`.chomp
+ #TODO assert_match /[title, abstract]/, response
+ assert_match /[S2008]/, response
+ #test_resource_Study
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/2/S2008`.chomp
+ assert_match /[TG\-GATEs]/, response
+ assert_match /[hasAssay, A1838, hasProtocol, P_2010]/, response
+ #test_resource_Assay
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/2/A1838`.chomp
+ #TODO fix Assay content
+ assert_match /Assay/, response
+ #test_resource_Protocol
+ response = `curl -i -k -H subjectid:#{id} -H accept:application/rdf+xml https://toxbank-dev.in-silico.ch/2/P_2010`.chomp
+ assert_match /[label, P\-MTAB\-23090]/, response
end
-
end