test/ft_28_fileparticipant.rb in ruote-0.9.18 vs test/ft_28_fileparticipant.rb in ruote-0.9.19
- old
+ new
@@ -18,46 +18,46 @@
require 'flowtestbase'
class FlowTest28 < Test::Unit::TestCase
- include FlowTestBase
+ include FlowTestBase
- #def teardown
- #end
+ #def teardown
+ #end
- #def setup
- #end
+ #def setup
+ #end
- #
- # TEST 0
+ #
+ # TEST 0
- class TestDefinition0 < OpenWFE::ProcessDefinition
- sequence do
- participant :fp
- _print "done"
- end
+ class TestDefinition0 < OpenWFE::ProcessDefinition
+ sequence do
+ participant :fp
+ _print "done"
end
+ end
- def test_0
+ def test_0
- FileUtils.mkdir("./work/in") unless File.exist? "./work/in"
+ FileUtils.mkdir("./work/in") unless File.exist? "./work/in"
- @engine.register_participant "fp", OpenWFE::FileParticipant
- @engine.add_workitem_listener OpenWFE::FileListener, "500"
+ @engine.register_participant "fp", OpenWFE::FileParticipant
+ @engine.add_workitem_listener OpenWFE::FileListener, "500"
- fei = launch TestDefinition0
+ fei = launch TestDefinition0
- sleep 0.350
+ sleep 0.350
- Find.find("./work/out/") do |path|
- next unless path.match ".*\.yaml$"
- FileUtils.mv path, "./work/in/"
- end
+ Find.find("./work/out/") do |path|
+ next unless path.match ".*\.yaml$"
+ FileUtils.mv path, "./work/in/"
+ end
- sleep 2.000
+ sleep 2.000
- assert_equal 1, engine.get_expression_storage.size
- end
+ assert_equal 1, engine.get_expression_storage.size
+ end
end