test/ft_64_alias.rb in ruote-0.9.18 vs test/ft_64_alias.rb in ruote-0.9.19

- old
+ new

@@ -1,102 +1,101 @@ # -# Testing OpenWFE +# Testing OpenWFEru (Ruote) # # John Mettraux at openwfe.org # require 'openwfe/def' require 'flowtestbase' class FlowTest64a < Test::Unit::TestCase - include FlowTestBase + include FlowTestBase - #def teardown - #end + #def teardown + #end - #def setup - #end + #def setup + #end - # - # TEST 0 + # + # TEST 0 - class Test0 < ProcessDefinition - sequence do - participant :bravo - participant :abracadabra - end + class Test0 < OpenWFE::ProcessDefinition + sequence do + participant :bravo + participant :abracadabra end + end - #def xxxx_0 - def test_0 + def test_0 - @engine.register_participant "a.*" do |workitem| - @tracer << workitem.participant_name - @tracer << "\n" - end + @engine.register_participant 'a.*' do |workitem| + @tracer << workitem.participant_name + @tracer << "\n" + end - @engine.register_participant :bravo, AliasParticipant.new("alpha") + @engine.register_participant :bravo, OpenWFE::AliasParticipant.new("alpha") - dotest(Test0, "alpha\nabracadabra") - end + dotest(Test0, "alpha\nabracadabra") + end - # - # TEST 1 + # + # TEST 1 - class Test1 < ProcessDefinition - sequence do - set :v => "toto", :val => "elvis" - toto - end + class Test1 < OpenWFE::ProcessDefinition + sequence do + set :v => 'toto', :val => 'elvis' + toto end + end - def test_1 + def test_1 - #log_level_to_debug + #log_level_to_debug - @engine.register_participant "elvis" do - @tracer << "sivle" - end - - dotest(Test1, "sivle") + @engine.register_participant 'elvis' do + @tracer << 'sivle' end + dotest(Test1, 'sivle') + end - # - # TEST 2 - class Test2 < ProcessDefinition + # + # TEST 2 - # - # some aliases + class Test2 < OpenWFE::ProcessDefinition - set :v => "alice", :val => "elvis" - set :v => "bob", :val => "elvis" + # + # some aliases - # - # the body of the process + set :v => 'alice', :val => 'elvis' + set :v => 'bob', :val => 'elvis' - sequence do - alice - bob - end + # + # the body of the process + + sequence do + alice + bob end + end - def test_2 + def test_2 - #log_level_to_debug + #log_level_to_debug - @engine.register_participant "elvis" do |workitem| - @tracer << workitem.fei.expression_id - @tracer << "\n" - end - - dotest Test2, "0.2.0\n0.2.1" + @engine.register_participant 'elvis' do |workitem| + @tracer << workitem.fei.expression_id + @tracer << "\n" end + + dotest Test2, "0.2.0\n0.2.1" + end end