test/param_test.rb in openwferu-0.9.16 vs test/param_test.rb in openwferu-0.9.17
- old
+ new
@@ -36,19 +36,17 @@
li = OpenWFE::LaunchItem.new(definition)
e = nil
begin
- @engine.launch(li)
+ @engine.launch li
rescue Exception => e
#puts e
#puts OpenWFE::exception_to_s(e)
end
- assert_equal \
- e.to_s,
- "field 'address' is missing"
+ assert_equal "field 'address' is missing", e.to_s
# second round
li = OpenWFE::LaunchItem.new(definition)
li.address = "rose garden 4"
@@ -65,11 +63,11 @@
#puts OpenWFE::exception_to_s(e)
end
assert_nil e
- sleep 0.200
+ sleep 0.350
# let the flow terminate on its own
end
#
@@ -94,13 +92,11 @@
rescue Exception => e
#puts e
#puts OpenWFE::exception_to_s(e)
end
- assert_equal \
- e.to_s,
- "field 'customer' is missing"
+ assert_equal "field 'customer' is missing", e.to_s
li = OpenWFE::LaunchItem.new(TestParam1)
li.customer = "bauhaus"
li.address = "rose garden 4"
@@ -141,14 +137,14 @@
rescue Exception => e
#puts e
#puts OpenWFE::exception_to_s(e)
end
- sleep 0.200
+ sleep 0.350
assert_nil e
- assert_equal @tracer.to_s, "(unknown address)"
+ assert_equal "(unknown address)", @tracer.to_s
end
#
# test 3
@@ -175,16 +171,16 @@
rescue Exception => e
#puts e
#puts OpenWFE::exception_to_s(e)
end
- sleep 0.200
+ sleep 0.350
# well, I should maybe refactor the test into a method
assert_nil e
- assert_equal @tracer.to_s, "3"
+ assert_equal "3", @tracer.to_s
end
#
# test 4
@@ -209,11 +205,11 @@
#puts e
#puts OpenWFE::exception_to_s(e)
end
assert_not_nil e
- assert_equal e.to_s, 'invalid value for Integer: "Colorado"'
+ assert_equal 'invalid value for Integer: "Colorado"', e.to_s
end
#
# test 5
@@ -235,12 +231,12 @@
rescue Exception => e
#puts e
#puts OpenWFE::exception_to_s(e)
end
- assert_equal e.to_s, "field 'phone' is missing"
- assert_equal e.class, OpenWFE::ParameterException
+ assert_equal "field 'phone' is missing", e.to_s
+ assert_equal OpenWFE::ParameterException, e.class
# second round
li = OpenWFE::LaunchItem.new(definition)
li.phone = "4444-333-4444"
@@ -255,10 +251,10 @@
#puts e
#puts OpenWFE::exception_to_s(e)
end
assert_not_nil e
- assert_equal e.to_s, "value of field 'phone' doesn't match"
+ assert_equal "value of field 'phone' doesn't match", e.to_s
end
#
# test 6