test/ft_2b_concurrence.rb in openwferu-0.9.16 vs test/ft_2b_concurrence.rb in openwferu-0.9.17
- old
+ new
@@ -41,12 +41,13 @@
def test_con_0
prepare()
- dotest(\
-'''<process-definition name="2b_con" revision="0">
+ dotest(
+ '''
+<process-definition name="2b_con" revision="0">
<sequence>
<concurrence
merge="lowest"
merge-type="mix"
>
@@ -59,12 +60,11 @@
<reval>puts "---r:" + workitem.key.to_s</reval>
-->
<print>${f:key}</print>
</sequence>
</process-definition>''',
-"charly")
-#0.25)
+ "charly")
end
#
# TEST 1
@@ -126,28 +126,33 @@
true""",
true)
end
def test_rawprog
- #def xxxx_rawprog
#puts TestDefinition1.new("lowest", "mix").make.to_s
- assert TestDefinition1.new("lowest", "mix").make.to_s == """
-<process-definition name='2b_con' revision='1'>
- <sequence>
- <concurrence merge='lowest' merge-type='mix'>
- <participant>alpha</participant>
- <participant>bravo</participant>
- <participant>charly</participant>
- </concurrence>
- <print>${f:key}
-${f:alpha}
-${f:bravo}
-${f:charly}</print>
- </sequence>
-</process-definition>
-""".strip
+ assert_equal(
+ "<process-definition name='2b_con' revision='1'>"+
+ "<sequence>"+
+ "<concurrence merge='lowest' merge-type='mix'>"+
+ "<participant>"+
+ "alpha"+
+ "</participant>"+
+ "<participant>"+
+ "bravo"+
+ "</participant>"+
+ "<participant>"+
+ "charly"+
+ "</participant>"+
+ "</concurrence>"+
+ "<print>"+
+ "${f:key}\n${f:alpha}\n${f:bravo}\n${f:charly}"+
+ "</print>"+
+ "</sequence>"+
+ "</process-definition>",
+ OpenWFE::ExpressionTree.to_s(
+ TestDefinition1.new("lowest", "mix").make))
end
#
# TEST 2