Sha256: 225ff8178fd3688c4e26d2fb06197d1daa383317c50633435b9a72e29653bc39

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon Jul  9 10:25:18 JST 2007
#

require 'rubygems'

require 'openwfe/def'
require 'flowtestbase'


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

    #def teardown
    #end

    #def setup
    #end

    #
    # TEST 0

    class SubDef < OpenWFE::ProcessDefinition
        _print "subruby"
    end

    SUBDEF = '''
        <process-definition name="sub" revision="0">
            <print>subxml</print>
        </process-definition>
    '''.strip

    class TestDefinition0 < OpenWFE::ProcessDefinition
        sequence do
            _print "main0"
            subruby
            subxml
            subfile
            _print "main1"
        end
    end

    def test_0

        #$OWFE_LOG.level = Logger::DEBUG

        engine.register_participant(
            "subruby", 
            OpenWFE::ProcessParticipant.new(SubDef))
        engine.register_participant(
            "subxml", 
            OpenWFE::ProcessParticipant.new(SUBDEF))

        File.open "work/procdef62.xml", "w+" do |f|
            f.write SUBDEF
            f.write "\n"
        end
        engine.register_participant(
            "subfile", 
            OpenWFE::ProcessParticipant.new('file:work/procdef62.xml'))

        dotest TestDefinition0, "main0\nsubruby\nsubxml\nsubxml\nmain1"
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.18 test/ft_62_procparticipant.rb