Sha256: b7b5968b16da2ee8efa1055b389b2107d304969d659ff236222175f3607fca8e

Contents?: true

Size: 792 Bytes

Versions: 6

Compression:

Stored size: 792 Bytes

Contents

#
# testing ruote
#
# Thu Dec 10 14:08:30 JST 2009
#

require File.join(File.dirname(__FILE__), '..', 'test_helper.rb')

require 'ruote/parser/ruby_dsl'
require 'ruote/engine'
require 'ruote/worker'
require 'ruote/storage/hash_storage'
require 'ruote/part/hash_participant'


class UtWaitLoggerTest < Test::Unit::TestCase

  def test_wait_for_participant

    pdef = Ruote.process_definition :name => 'test' do
      sequence do
        #wait '1'
        alpha
      end
    end

    engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::HashStorage.new))

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

    engine.launch(pdef)
    msg = engine.wait_for(:alpha)

    assert_equal 1, alpha.size

    assert_not_nil msg
    assert_not_nil msg['workitem']
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruote-2.1.6 test/unit/ut_3_wait_logger.rb
ruote-2.1.5 test/unit/ut_3_wait_logger.rb
ruote-2.1.4 test/unit/ut_3_wait_logger.rb
ruote-2.1.3 test/unit/ut_3_wait_logger.rb
ruote-2.1.2 test/unit/ut_3_wait_logger.rb
ruote-2.1.1 test/unit/ut_3_wait_logger.rb