blob: 01ed93069fdab4eafa6d66bce3998c6c30cb0ba6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
require_relative "setup.rb"
begin
puts "Service URI is: #{$algorithm[:uri]}"
rescue
puts "Configuration Error: $algorithm[:uri] is not defined in: " + File.join(ENV["HOME"],".opentox","config","test.rb")
exit
end
class AlgorithmTest < MiniTest::Test
def test_set_parameters
a = OpenTox::Algorithm::Generic.new
a.parameters = [
{RDF::DC.title => "test", RDF::OT.paramScope => "mandatory"},
{RDF::DC.title => "test2", RDF::OT.paramScope => "optional"}
]
assert_equal 2, a.parameters.size
assert_equal "mandatory", a.parameters.select{|p| p[RDF::DC.title] == "test"}.first[RDF::OT.paramScope]
end
end
|