Sha256: de9f16543d85f254a7f7c8e1c6cfdff812d7618165e52046bd6e5e2068e4e1c9

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

#
# Testing OpenWFEru (Ruote)
#
# John Mettraux at openwfe.org
#
# Mon Dec 25 14:27:48 JST 2006
#

require 'rubygems'

require 'openwfe/def'
require 'flowtestbase'


class FlowTest7b < Test::Unit::TestCase
  include FlowTestBase

  #def setup
  #end

  #def teardown
  #end


  def test_1

    dotest(
'<process-definition name="'+name_of_test+'''" revision="0">
  <sequence>
    <concurrence
      count="1"
    >
      <lose>
        <sequence>
          <sleep for="500" />
          <print>a</print>
        </sequence>
      </lose>
      <print>b</print>
    </concurrence>
    <print>c</print>
  </sequence>
</process-definition>''',
      "b\nc")
      #true,
      #true)
  end


  #
  # TEST 2

  class Test2 < OpenWFE::ProcessDefinition
    sequence do
      _print "before"
      concurrence :count => 1 do
        lose do
          sequence do
            _sleep :for => 350
            _print "ok 4"
          end
        end
        sequence do
          _print "ok 5"
        end
      end
      _print "after"
    end
  end

  def test_2

    dotest Test2, [ 'before', 'ok 5', 'after' ].join("\n")
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.19 test/ft_7b_lose.rb