Sha256: f9fe3f45e28d4dd539f221a0a331d65a9ce031c00e8454707bdf1b0578972dc7

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

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

require 'flowtestbase'
require 'openwfe/def'


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

    #def setup
    #end

    #def teardown
    #end


    #
    # Test 0
    #

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

    def test_0

        dotest TestCase44a0, "v"
    end


    #
    # Test 1
    #

    class TestCase44a1 < OpenWFE::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 test_1

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

        dotest TestCase44a1, "field_value"
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.18 test/ft_44_save.rb