test/functional/eft_19_reserve.rb in ruote-2.2.0 vs test/functional/eft_19_reserve.rb in ruote-2.3.0

- old
+ new

@@ -3,11 +3,11 @@ # testing ruote # # Fri Jul 31 21:44:04 JST 2009 # -require File.join(File.dirname(__FILE__), 'base') +require File.expand_path('../base', __FILE__) require 'ruote/participant' class EftReserveTest < Test::Unit::TestCase @@ -26,37 +26,37 @@ end end #noisy - alpha = @engine.register_participant :alpha, Ruote::StorageParticipant + alpha = @dashboard.register_participant :alpha, Ruote::StorageParticipant - wfid = @engine.launch(pdef) + wfid = @dashboard.launch(pdef) wait_for(:alpha) assert_equal 1, alpha.size assert_equal '0_0_0_0', alpha.first.fei.expid - ps = @engine.process(wfid) + ps = @dashboard.process(wfid) assert_equal 2, ps.variables.size assert_equal( [ 'mutex', 'a' ], ps.variables['a'][0, 2]) assert_equal( [ '0_0_0', '0_0_1' ], ps.variables['a'].last.collect { |e| e['expid'] }) - alpha.reply(alpha.first) + alpha.proceed(alpha.first) wait_for(:alpha) assert_equal 1, alpha.size assert_equal '0_0_1_0', alpha.first.fei.expid - alpha.reply(alpha.first) + alpha.proceed(alpha.first) wait_for(wfid) end def test_cancel_reserve @@ -72,29 +72,29 @@ end end #noisy - alpha = @engine.register_participant :alpha, Ruote::StorageParticipant + alpha = @dashboard.register_participant :alpha, Ruote::StorageParticipant - wfid = @engine.launch(pdef) + wfid = @dashboard.launch(pdef) wait_for(:alpha) - ps = @engine.process(wfid) + ps = @dashboard.process(wfid) exp = ps.expressions.find { |e| e.fei.expid == '0_0_0' } - @engine.cancel_expression(exp.fei) + @dashboard.cancel_expression(exp.fei) wait_for(:alpha) #alpha.instance_variable_get(:@items).each { |i| p i } assert_equal 1, alpha.size assert_equal '0_0_1_0', alpha.first.fei.expid - alpha.reply(alpha.first) + alpha.proceed(alpha.first) wait_for(wfid) end def test_reserve_but_no_name @@ -110,25 +110,25 @@ end end #noisy - alpha = @engine.register_participant :alpha, Ruote::StorageParticipant + alpha = @dashboard.register_participant :alpha, Ruote::StorageParticipant - wfid = @engine.launch(pdef) + wfid = @dashboard.launch(pdef) 2.times do wait_for(:alpha) assert_equal 1, alpha.size - ps = @engine.process(wfid) + ps = @dashboard.process(wfid) assert_equal 2, ps.variables.size assert_not_nil ps.variables['reserve'] - alpha.reply(alpha.first) + alpha.proceed(alpha.first) end wait_for(wfid) end end