test/ft_7b_lose.rb in ruote-0.9.18 vs test/ft_7b_lose.rb in ruote-0.9.19
- old
+ new
@@ -1,8 +1,8 @@
#
-# Testing OpenWFE
+# Testing OpenWFEru (Ruote)
#
# John Mettraux at openwfe.org
#
# Mon Dec 25 14:27:48 JST 2006
#
@@ -12,67 +12,67 @@
require 'openwfe/def'
require 'flowtestbase'
class FlowTest7b < Test::Unit::TestCase
- include FlowTestBase
+ include FlowTestBase
- #def setup
- #end
+ #def setup
+ #end
- #def teardown
- #end
+ #def teardown
+ #end
- def test_1
+ def test_1
- dotest(
+ dotest(
'<process-definition name="'+name_of_test+'''" revision="0">
- <sequence>
- <concurrence
- count="1"
- >
- <lose>
- <sequence>
- <sleep for="500" />
- <print>a</print>
- </sequence>
- </lose>
- <print>b</print>
- </concurrence>
- <print>c</print>
- </sequence>
-</process-definition>''',
- "b\nc")
- #true,
- #true)
- end
+ <sequence>
+ <concurrence
+ count="1"
+ >
+ <lose>
+ <sequence>
+ <sleep for="500" />
+ <print>a</print>
+ </sequence>
+ </lose>
+ <print>b</print>
+ </concurrence>
+ <print>c</print>
+ </sequence>
+</process-definition>''',
+ "b\nc")
+ #true,
+ #true)
+ end
- #
- # TEST 2
+ #
+ # TEST 2
- class Test2 < OpenWFE::ProcessDefinition
+ class Test2 < OpenWFE::ProcessDefinition
+ sequence do
+ _print "before"
+ concurrence :count => 1 do
+ lose do
+ sequence do
+ _sleep :for => 350
+ _print "ok 4"
+ end
+ end
sequence do
- _print "before"
- concurrence :count => 1 do
- lose do
- sequence do
- _sleep :for => 350
- _print "ok 4"
- end
- end
- sequence do
- _print "ok 5"
- end
- end
- _print "after"
+ _print "ok 5"
end
+ end
+ _print "after"
end
+ end
- def test_2
+ def test_2
- dotest Test2, [ 'before', 'ok 5', 'after' ].join("\n")
- end
+ dotest Test2, [ 'before', 'ok 5', 'after' ].join("\n")
+ end
end