Sha256: 782b154e5ab8e22bcc4d1159bb6c7a601703a32808a483a9e208eeb5ec5dc218

Contents?: true

Size: 1.63 KB

Versions: 3

Compression:

Stored size: 1.63 KB

Contents

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

require 'openwfe/def'
require 'flowtestbase'


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

    #def setup
    #end

    #def teardown
    #end

    #def xxxx_lose_1
    def test_lose_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
c""", 
            0.1,
            true)
    end


    #
    # TEST 2

    class TestDefinition2 < ProcessDefinition
        def make
            process_definition :name => "7_lose", :revision => "2" do
                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
        end
    end

    #def xxxx_lose_2
    def test_lose_2
        dotest(
            TestDefinition2, 
            """before
ok 5
after""",
            0.1)
    end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openwferu-0.9.7 test/ft_7b_lose.rb
openwferu-0.9.8 test/ft_7b_lose.rb
openwferu-0.9.9 test/ft_7b_lose.rb