test/functional/eft_8_undo.rb in ruote-2.1.11 vs test/functional/eft_8_undo.rb in ruote-2.2.0
- old
+ new
@@ -5,11 +5,11 @@
# Sun Jun 14 14:48:03 JST 2009
#
require File.join(File.dirname(__FILE__), 'base')
-require 'ruote/part/hash_participant'
+require 'ruote/participant'
class EftUndoTest < Test::Unit::TestCase
include FunctionalBase
@@ -21,11 +21,11 @@
undo :ref => 'kilroy'
end
echo 'over'
end
- alpha = @engine.register_participant :alpha, Ruote::HashParticipant.new
+ alpha = @engine.register_participant :alpha, Ruote::StorageParticipant
#noisy
assert_trace %w[ over ], pdef
@@ -45,11 +45,11 @@
cancel :kilroy
end
echo 'over'
end
- alpha = @engine.register_participant :alpha, Ruote::HashParticipant.new
+ alpha = @engine.register_participant :alpha, Ruote::StorageParticipant
#noisy
assert_trace %w[ over ], pdef
@@ -69,9 +69,45 @@
end
echo '.'
end
#noisy
+
+ assert_trace '.', pdef
+ end
+
+ def test_undo_missing_tag
+
+ pdef = Ruote.process_definition do
+ cancel :nada
+ echo '.'
+ end
+
+ assert_trace '.', pdef
+ end
+
+ def test_undo_tag_pointing_nowhere
+
+ pdef = Ruote.process_definition do
+ set 'v:nada' => []
+ cancel :nada
+ echo '.'
+ end
+
+ #@engine.noisy = true
+
+ assert_trace '.', pdef
+ end
+
+ def test_undo_tag_pointing_to_missing_fei
+
+ pdef = Ruote.process_definition do
+ set 'v:nada' => { 'wfid' => '${wfid}', 'expid' => '${expid}', 'engine_id' => '${engine_id}' }
+ cancel :nada
+ echo '.'
+ end
+
+ #@engine.noisy = true
assert_trace '.', pdef
end
end