Sha256: 28931c63d3574c1c422f3c1d5aea3721054580b3875db5a3d853c1b25854c7a2

Contents?: true

Size: 908 Bytes

Versions: 7

Compression:

Stored size: 908 Bytes

Contents

#
# testing ruote
#
# Sat Jan 24 22:40:35 JST 2009
#

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


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

  def test_empty_sequence

    pdef = Ruote.process_definition :name => 'test' do
      sequence do
      end
    end

    #noisy

    assert_trace(pdef, '')
  end

  def test_a_b_sequence

    pdef = Ruote.process_definition :name => 'test' do
      sequence do
        echo 'a'
        echo 'b'
      end
    end

    #noisy

    assert_trace(pdef, "a\nb")
  end

  def test_alice_bob_sequence

    pdef = Ruote.process_definition :name => 'test' do
      sequence do
        participant :ref => 'alice'
        participant :ref => 'bob'
      end
    end

    @engine.register_participant '.+' do |workitem|
      @tracer << workitem.participant_name + "\n"
    end

    #noisy

    assert_trace(pdef, "alice\nbob")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruote-2.1.7 test/functional/eft_2_sequence.rb
ruote-2.1.6 test/functional/eft_2_sequence.rb
ruote-2.1.5 test/functional/eft_2_sequence.rb
ruote-2.1.4 test/functional/eft_2_sequence.rb
ruote-2.1.3 test/functional/eft_2_sequence.rb
ruote-2.1.2 test/functional/eft_2_sequence.rb
ruote-2.1.1 test/functional/eft_2_sequence.rb