Sha256: 864f7452c691977dcfe5b1f5e4769a5874af1346b42e835a456671ece94d0894

Contents?: true

Size: 908 Bytes

Versions: 6

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("a\nb", pdef)
  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("alice\nbob", pdef)
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ruote-maestrodev-2.2.1 test/functional/eft_2_sequence.rb
ruote-2.2.0 test/functional/eft_2_sequence.rb
ruote-2.1.11 test/functional/eft_2_sequence.rb
ruote-2.1.10 test/functional/eft_2_sequence.rb
ruote-2.1.9 test/functional/eft_2_sequence.rb
ruote-2.1.8 test/functional/eft_2_sequence.rb