Sha256: 9bdc5ab51164b02a1acd500a00338bfe8c4a7b84a26c1521e387bd5c289add71

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 Bytes

Contents

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

require 'flowtestbase'
require 'openwfe/def'
require 'openwfe/extras/participants/csvparticipants'


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 < OpenWFE::ProcessDefinition
    sequence do
      set :field => "weather", :value => "cloudy"
      set :field => "month", :value => "may"
      decision
      _print "${f:take_umbrella?}"
    end
  end

  def test_0

    csvParticipant = OpenWFE::Extras::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
ruote-0.9.19 test/extras/ft_19_csv.rb