Sha256: d7e899f219f9b9595ed0ce15a350a984ada86d2def459c7253262ba939a2125f

Contents?: true

Size: 1.23 KB

Versions: 11

Compression:

Stored size: 1.23 KB

Contents

#
# Testing OpenWFEru
#
# John Mettraux at openwfe.org
#

require 'flowtestbase'
require 'openwfe/def'

include OpenWFE


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

    #def setup
    #end

    #def teardown
    #end


    #
    # Test 0
    #

    class TestCase44a0 < ProcessDefinition
        sequence do
            set :field => "f", :value => "v"
            save :to_field => "saved"
            #pp_workitem
            _print "${f:saved.f}"
        end
    end

    #def xxxx_0
    def test_0
        dotest(
            TestCase44a0,
            """
v
            """.strip)
    end


    #
    # Test 1
    #

    class TestCase44a1 < ProcessDefinition
        sequence do

            set :field => "f", :value => "field_value"
            save :to_variable => "v"

            #pp_workitem
            #_print "${r:fexp.lookup_variable('v').f}"
                #
                # doesn't work in case of ptest

            print_var
        end
    end

    #def xxxx_1
    def test_1

        @engine.register_participant :print_var do |fexp, wi|
            @tracer << fexp.lookup_variable('v').f.to_s
        end

        dotest(
            TestCase44a1,
            """
field_value
            """.strip)
    end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
openwferu-0.9.10 test/ft_44_save.rb
openwferu-0.9.10.653 test/ft_44_save.rb
openwferu-0.9.11 test/ft_44_save.rb
openwferu-0.9.12 test/ft_44_save.rb
openwferu-0.9.12.863 test/ft_44_save.rb
openwferu-0.9.13 test/ft_44_save.rb
openwferu-0.9.14 test/ft_44_save.rb
openwferu-0.9.15 test/ft_44_save.rb
openwferu-0.9.16 test/ft_44_save.rb
openwferu-0.9.17 test/ft_44_save.rb
openwferu-0.9.9 test/ft_44_save.rb