From 354aaa649e9eeed5d81793e09d9714b45063c147 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 8 Feb 2012 13:14:11 +0100 Subject: toxbank-investigation compatible version --- test/task.rb | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 test/task.rb (limited to 'test/task.rb') diff --git a/test/task.rb b/test/task.rb new file mode 100644 index 0000000..1f0c9c2 --- /dev/null +++ b/test/task.rb @@ -0,0 +1,34 @@ +require 'test/unit' +$LOAD_PATH << File.join(File.dirname(__FILE__),'..','lib') +require File.join File.dirname(__FILE__),'..','lib','opentox-client.rb' +#require "./validate-owl.rb" +# +TASK_SERVICE_URI = "http://ot-dev.in-silico.ch/task" + +class TaskTest < Test::Unit::TestCase + + def setup + end + + def teardown + end + + def test_create_and_complete + task = OpenTox::Task.create TASK_SERVICE_URI + assert_equal "Running", task.status + task.completed "http://test.org" + assert_equal "Completed", task.status + assert_equal "http://test.org", task.result_uri + end + + + def test_rdf + task = OpenTox::Task.all(TASK_SERVICE_URI).last + assert_equal OpenTox::Task, task.class + #validate_owl(task.uri) + #puts task.uri + end +=begin +=end + +end -- cgit v1.2.3