Sha256: a2f7f5269ec1ef63de5afb62a17131a8a6a1f085b07d9fbc0268d875068b24ac

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

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

require 'flowtestbase'
require 'openwfe/expressions/raw_prog'
require 'openwfe/participants/csvparticipant'

include OpenWFE



class FlowTest19 < FlowTestBase

    CSV0 = \
"""
in:weather, in:month, out:take_umbrella?
,,
raining,    ,         yes
sunny,      ,         no
cloudy,     june,     yes
cloudy,     may,      yes
cloudy,     ,         no
"""

    #def setup
    #end

    #def teardown
    #end

    #
    # Test 0
    #

    class TestDefinition0 < ProcessDefinition
        def make
            process_definition :name => "test0", :revision => "0" do
                sequence do
                    set :field => "weather", :value => "cloudy"
                    set :field => "month", :value => "may"
                    decision
                    _print "${f:take_umbrella?}"
                end
            end
        end
    end

    def test_0

        csvParticipant = CsvParticipant.new(CSV0)

        @engine.register_participant("decision", csvParticipant)

        dotest(
            TestDefinition0,
            "yes")
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openwferu-0.9.4 test/ft_19_csv.rb