Sha256: 110cfb1542163743d7d5db3621d1aebe506b47ac91d7863c607c15480b6295cb

Contents?: true

Size: 910 Bytes

Versions: 8

Compression:

Stored size: 910 Bytes

Contents

#
# testing ruote
#
# Wed Jul  1 09:51:30 JST 2009
#

require File.join(File.dirname(__FILE__), 'base')

require 'ruote/part/hash_participant'


class FtParticipantParamsTest < Test::Unit::TestCase
  include FunctionalBase

  def test_params

    pdef = Ruote.process_definition do
      sequence do
        alpha
        alpha :activity => 'buy groceries'
        alpha
      end
    end

    alpha = @engine.register_participant :alpha, Ruote::HashParticipant.new

    #noisy

    wfid = @engine.launch(pdef)

    wait_for(:alpha)
    assert_equal({ 'ref' => 'alpha' }, alpha.first.fields['params'])
    alpha.reply(alpha.first)

    wait_for(:alpha)
    assert_equal('buy groceries', alpha.first.fields['params']['activity'])
    alpha.reply(alpha.first)

    wait_for(:alpha)
    assert_equal({ 'ref' => 'alpha' }, alpha.first.fields['params'])
    alpha.reply(alpha.first)

    wait_for(wfid)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruote-2.1.11 test/functional/ft_16_participant_params.rb
ruote-2.1.10 test/functional/ft_16_participant_params.rb
ruote-2.1.9 test/functional/ft_16_participant_params.rb
ruote-2.1.8 test/functional/ft_16_participant_params.rb
ruote-2.1.7 test/functional/ft_16_participant_params.rb
ruote-2.1.6 test/functional/ft_16_participant_params.rb
ruote-2.1.5 test/functional/ft_16_participant_params.rb
ruote-2.1.4 test/functional/ft_16_participant_params.rb