Sha256: 724c1ff57677924b0b71e5fb397601c2b6cf5f01af6e92fa30bece3c110f1175

Contents?: true

Size: 1.1 KB

Versions: 5

Compression:

Stored size: 1.1 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Tue Sep 11 21:32:10 JST 2007
#

require 'openwfe/def'

require 'flowtestbase'


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

    #def teardown
    #end

    #def setup
    #end

    #
    # TEST 0

    class Test0 < ProcessDefinition
        sequence do
            alpha :id => 0
            alpha :id => 1, :if => "${r:$count > 1}"
            alpha :id => 2
            alpha :id => 3, :if => "${r:$count > 1}"
        end
    end

    def test_0

        #log_level_to_debug

        $count = 0

        @engine.register_participant :alpha do |workitem|
            @tracer << "#{workitem.params["id"]} #{$count}\n"
            $count += 1
        end

        dotest(Test0, "0 0\n2 1\n3 2")
    end

    #
    # TEST 1

    class Test1 < ProcessDefinition
        sequence do
            subp :id => 0
            subp :id => 1, :unless => "true"
            subp :id => 2
        end
        process_definition :name => "subp" do
            _print "${id}"
        end
    end

    def test_0

        dotest(Test1, "0\n2")
    end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
openwferu-0.9.14 test/ft_68_ifparticipant.rb
openwferu-0.9.15 test/ft_68_ifparticipant.rb
openwferu-0.9.16 test/ft_68_ifparticipant.rb
openwferu-0.9.17 test/ft_68_ifparticipant.rb
ruote-0.9.18 test/ft_68_ifparticipant.rb