Sha256: c1a3983ec59a5a289b175d92ab4097f5774473d7a30b05c0054d755ad2a6c646

Contents?: true

Size: 1.42 KB

Versions: 3

Compression:

Stored size: 1.42 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Thu Nov  1 15:21:34 JST 2007
#

require 'openwfe/def'

require 'flowtestbase'


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

    #def teardown
    #end

    #def setup
    #end

    #
    # TEST 0

    class Test0 < OpenWFE::ProcessDefinition
        sequence do
            set :field => "f0", :value => [ 'my', 'array' ]
            set :field => :f1, :value => [ 'my', 'array' ]
            _print "${f:f0.0}"
            _print "${f:f1.1}"
        end
    end

    def test_0

        dotest Test0, "my\narray"
    end

    #
    # TEST 1

    class Test1 < OpenWFE::ProcessDefinition
        sequence do
            set :field => "f0", :value => true
            _print "${r:workitem.f0.class.name}"
        end
    end

    def test_1

        dotest Test1, "TrueClass"
    end

    #
    # TEST 2

    class Test2 < OpenWFE::ProcessDefinition
        sequence do
            set :variable => "v0", :value => "alpha"
            set :variable => :v0, :value => "bravo"
            _print "${v0}"
            set :field => "f0", :value => "alpha"
            set :field => :f0, :value => "bravo"
            _print "${f:f0}"
        end
    end

    def test_2

        dotest Test2, "bravo\nbravo"
    end

    #
    # TEST 3

    #class Test3 < OpenWFE::ProcessDefinition
    #    sequence do
    #    end
    #end
    #def test_3
    #    dotest Test3, "6"
    #end

end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
openwferu-0.9.16 test/ft_75_ruby_attributes.rb
openwferu-0.9.17 test/ft_75_ruby_attributes.rb
ruote-0.9.18 test/ft_75_ruby_attributes.rb