Sha256: 230369a8f6c1a0ceff075a8d2dce4b3f21d210b087090d895ee2c75669522e06

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon Oct  9 22:19:44 JST 2006
#

require 'find'
require 'fileutils'

require 'rubygems'

require 'openwfe/def'
require 'openwfe/listeners/listeners'
require 'openwfe/participants/participants'

require 'flowtestbase'


class FlowTest28 < Test::Unit::TestCase
    include FlowTestBase

    #def teardown
    #end

    #def setup
    #end

    #
    # TEST 0

    class TestDefinition0 < OpenWFE::ProcessDefinition
        sequence do
            participant :fp
            _print "done"
        end
    end

    def test_0

        FileUtils.mkdir("./work/in") unless File.exist? "./work/in"

        @engine.register_participant "fp", OpenWFE::FileParticipant
        @engine.add_workitem_listener OpenWFE::FileListener, "500"

        fei = launch TestDefinition0

        sleep 0.350

        Find.find("./work/out/") do |path|
            next unless path.match ".*\.yaml$"
            FileUtils.mv path, "./work/in/"
        end

        sleep 2.000

        assert_equal 1, engine.get_expression_storage.size
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.18 test/ft_28_fileparticipant.rb