diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/feature.rb | 39 | ||||
-rw-r--r-- | test/rest.rb | 2 |
2 files changed, 40 insertions, 1 deletions
diff --git a/test/feature.rb b/test/feature.rb new file mode 100644 index 0000000..479e29f --- /dev/null +++ b/test/feature.rb @@ -0,0 +1,39 @@ +$LOAD_PATH << File.expand_path( File.dirname(__FILE__) + '/../lib' ) +require 'rubygems' +require 'opentox-ruby-minimal' +require 'test/unit' +#require 'validate-owl' + +class FeatureTest < Test::Unit::TestCase + + def setup + @features = [ + #@@classification_training_dataset.features.keys.first, + "http://apps.ideaconsult.net:8080/ambit2/feature/35796", + #File.join(OpenTox::Model::Lazar.all.last,"predicted","value") + + ] + end + + def test_feature + @features.each do |uri| + puts uri + f = OpenTox::Feature.new(uri) + metadata = f.metadata + puts metadata.inspect + assert_equal RDF::OT.Feature, metadata[RDF.type] + end + end + +=begin + def test_owl + #@features.each do |uri| + validate_owl @features.first, @@subjectid unless CONFIG[:services]["opentox-dataset"].match(/localhost/) + validate_owl @features.last, @@subjectid unless CONFIG[:services]["opentox-dataset"].match(/localhost/) + # Ambit does not validate + #end + end +=end + + +end diff --git a/test/rest.rb b/test/rest.rb index 576e712..1000b4e 100644 --- a/test/rest.rb +++ b/test/rest.rb @@ -1,6 +1,6 @@ $LOAD_PATH << File.expand_path( File.dirname(__FILE__) + '/../lib' ) require 'rubygems' -require 'opentox.rb' +require 'opentox-ruby-minimal.rb' require 'test/unit' class RestTest < Test::Unit::TestCase |