Sha256: aa48ba35c8b15263de79746876ccf5c39c8693f8d45f51f7b70876d83c7446db

Contents?: true

Size: 1.13 KB

Versions: 8

Compression:

Stored size: 1.13 KB

Contents

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

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

include OpenWFE



class FlowTest19 < Test::Unit::TestCase
    include 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

8 entries across 8 versions & 1 rubygems

Version Path
openwferu-0.9.10 test/ft_19_csv.rb
openwferu-0.9.10.653 test/ft_19_csv.rb
openwferu-0.9.11 test/ft_19_csv.rb
openwferu-0.9.12 test/ft_19_csv.rb
openwferu-0.9.6 test/ft_19_csv.rb
openwferu-0.9.7 test/ft_19_csv.rb
openwferu-0.9.8 test/ft_19_csv.rb
openwferu-0.9.9 test/ft_19_csv.rb