test/description_test.rb in ruote-0.9.18 vs test/description_test.rb in ruote-0.9.19
- old
+ new
@@ -17,71 +17,72 @@
# testing definition.get_description
#
class DescriptionTest < Test::Unit::TestCase
- #def setup
- #end
+ #def setup
+ #end
- #def teardown
- #end
+ #def teardown
+ #end
- DEF0 = """
+ DEF0 = """
class MyDef0 < OpenWFE::ProcessDefinition
- description 'not much to say'
- sequence do
- end
+ description 'not much to say'
+ sequence do
+ end
end
- """
+ """
- def test_0
+ def test_0
- #rep = OpenWFE::SimpleExpRepresentation.from_code DEF0
- rep = OpenWFE::DefParser.parse_string DEF0
+ #rep = OpenWFE::SimpleExpRepresentation.from_code DEF0
+ #rep = OpenWFE::DefParser.parse_string DEF0
+ rep = OpenWFE::DefParser.parse DEF0
- assert_equal(
- "not much to say",
- OpenWFE::ExpressionTree.get_description(rep))
- end
+ assert_equal(
+ "not much to say",
+ OpenWFE::ExpressionTree.get_description(rep))
+ end
- DEF1 = <<-EOS
+ DEF1 = <<-EOS
<process-definition name="x" revision="y">
- <description>
- just a tiny process
- </description>
- <participant ref="nada" />
+ <description>
+ just a tiny process
+ </description>
+ <participant ref="nada" />
</process-definition>
- EOS
+ EOS
- def test_1
+ def test_1
- rep = OpenWFE::DefParser.parse_string DEF1
+ rep = OpenWFE::DefParser.parse DEF1
- assert_equal(
- "just a tiny process",
- OpenWFE::ExpressionTree.get_description(rep))
- end
+ assert_equal(
+ "just a tiny process",
+ OpenWFE::ExpressionTree.get_description(rep))
+ end
- class Test2 < OpenWFE::ProcessDefinition
- # no description
- sequence do
- end
+ class Test2 < OpenWFE::ProcessDefinition
+ # no description
+ sequence do
end
- class Test2b < OpenWFE::ProcessDefinition
- # no description
- sequence do
- end
- define "sub0" do
- end
+ end
+ class Test2b < OpenWFE::ProcessDefinition
+ # no description
+ sequence do
end
+ define "sub0" do
+ end
+ end
- def test_2
+ def test_2
- tree = OpenWFE::DefParser.parse Test2
- assert_nil OpenWFE::ExpressionTree.get_description(tree)
+ tree = OpenWFE::DefParser.parse Test2
+ assert_nil OpenWFE::ExpressionTree.get_description(tree)
- tree = OpenWFE::DefParser.parse Test2b
- #p tree
- assert_nil OpenWFE::ExpressionTree.get_description(tree)
- end
+ tree = OpenWFE::DefParser.parse Test2b
+ #p tree
+ assert_nil OpenWFE::ExpressionTree.get_description(tree)
+ end
end