summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2012-01-12 12:55:40 +0100
committerChristoph Helma <helma@in-silico.ch>2012-01-12 12:55:40 +0100
commit17c5833fbaa7f06b0b7f13494bd2649fd75e35f3 (patch)
tree001be2376e88bcd1d09ea6e7dd1c371ff0fb294e /test
parente84a1b439e63ae3ed3b4bc3bc78261f95daf9ab7 (diff)
feature test added, version reset to 0.0.1
Diffstat (limited to 'test')
-rw-r--r--test/feature.rb39
-rw-r--r--test/rest.rb2
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