Sha256: 14c7f1dd0ff1dc23f0b57140f06718510b634526470cd0c0259ec14be7e75ecd

Contents?: true

Size: 1.34 KB

Versions: 1

Compression:

Stored size: 1.34 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon Dec 25 14:27:48 JST 2006
#

require 'rubygems'

require 'openwfe/def'
require 'flowtestbase'


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

    #def setup
    #end

    #def teardown
    #end


    def test_1

        dotest(
'<process-definition name="'+name_of_test+'''" revision="0">
    <sequence>
        <concurrence
            count="1"
        >
            <lose>
                <sequence>
                    <sleep for="500" />
                    <print>a</print>
                </sequence>
            </lose>
            <print>b</print>
        </concurrence>
        <print>c</print>
    </sequence>
</process-definition>''', 
            "b\nc")
            #true,
            #true)
    end


    #
    # TEST 2

    class Test2 < OpenWFE::ProcessDefinition
        sequence do
            _print "before"
            concurrence :count => 1 do
                lose do
                    sequence do
                        _sleep :for => 350
                        _print "ok 4"
                    end
                end
                sequence do 
                    _print "ok 5"
                end
            end
            _print "after"
        end
    end

    def test_2

        dotest Test2, [ 'before', 'ok 5', 'after' ].join("\n")
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.18 test/ft_7b_lose.rb