test/ft_17_condition.rb in ruote-0.9.18 vs test/ft_17_condition.rb in ruote-0.9.19
- old
+ new
@@ -9,76 +9,76 @@
require 'flowtestbase'
class FlowTest17 < Test::Unit::TestCase
- include FlowTestBase
+ include FlowTestBase
- #def setup
- #end
+ #def setup
+ #end
- #def teardown
- #end
+ #def teardown
+ #end
- def test_condition_0
- dotest(
+ def test_condition_0
+ dotest(
'''<process-definition name="con" revision="0">
- <if test="a == a">
- <print>ok</print>
- </if>
+ <if test="a == a">
+ <print>ok</print>
+ </if>
</process-definition>''', "ok")
- end
+ end
- def test_condition_1
- dotest(
+ def test_condition_1
+ dotest(
'''<process-definition name="con" revision="0">
- <if test="a == b">
- <print>ok</print>
- </if>
+ <if test="a == b">
+ <print>ok</print>
+ </if>
</process-definition>''', "")
- end
+ end
- def test_condition_2
- dotest(
+ def test_condition_2
+ dotest(
'''<process-definition name="con" revision="0">
- <sequence>
- <set field="toto" value="nada" />
- <if test="${f:toto} == nada">
- <print>ok</print>
- </if>
- </sequence>
+ <sequence>
+ <set field="toto" value="nada" />
+ <if test="${f:toto} == nada">
+ <print>ok</print>
+ </if>
+ </sequence>
</process-definition>''', "ok")
- end
+ end
- def test_condition_3
- dotest(
+ def test_condition_3
+ dotest(
'''<process-definition name="con" revision="0">
- <sequence>
- <set field="toto" value="true" />
- <if test="${f:toto}">
- <print>ok</print>
- </if>
- </sequence>
+ <sequence>
+ <set field="toto" value="true" />
+ <if test="${f:toto}">
+ <print>ok</print>
+ </if>
+ </sequence>
</process-definition>''', "ok")
- end
+ end
- def test_condition_4
- dotest(
+ def test_condition_4
+ dotest(
'''<process-definition name="con" revision="0">
- <if rtest="1+2 == 3">
- <print>ok</print>
- </if>
+ <if rtest="1+2 == 3">
+ <print>ok</print>
+ </if>
</process-definition>''', "ok")
- end
+ end
- def test_condition_5
- dotest(
+ def test_condition_5
+ dotest(
'''<process-definition name="con" revision="0">
- <if test="1+2 == 3">
- <print>ok</print>
- <print>nok</print>
- </if>
+ <if test="1+2 == 3">
+ <print>ok</print>
+ <print>nok</print>
+ </if>
</process-definition>''', "ok")
- end
+ end
end