Sha256: 3b7a439e1ba27a9ceaf28bb671de78e94a00f7ddb73ee015713a8cfff0950a6c

Contents?: true

Size: 1.69 KB

Versions: 5

Compression:

Stored size: 1.69 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Tue Jan  2 13:14:37 JST 2007
#

require 'openwfe/expressions/raw_prog'
require 'openwfe/participants/participants'
require 'flowtestbase'


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

    #def setup
    #end

    #def teardown
    #end

    #
    # Test 0
    #

    class TestDefinition0 < OpenWFE::ProcessDefinition
        def make
            process_definition :name => "test0", :revision => "0" do
                iterator :on_value => "x, y, z", :to_variable => "v0" do
                    _print "${f:__ip__} -- ${v0}"
                end
            end
        end
    end

    def test_ppd_0
        dotest(
            TestDefinition0,
            """0 -- x
1 -- y
2 -- z""")
    end


    #
    # Test 1
    #

    class TestDefinition1 < OpenWFE::ProcessDefinition
        def make
            process_definition :name => "test1", :revision => "0" do
                iterator :on_value => "x, y, z", :to_field => "f0" do
                    _print "${f:__ip__} -- ${f:f0}"
                end
            end
        end
    end

    def test_ppd_1
    #def xxxx_ppd_1
        dotest(
            TestDefinition1,
            """0 -- x
1 -- y
2 -- z""")
    end


    #
    # Test 2
    #

    class TestDefinition2 < OpenWFE::ProcessDefinition
        def make
            iterator \
                :on_value => "xayaz", 
                :to_field => "f0",
                :value_separator => "a" do

                _print "${f:__ip__} -- ${f:f0}"
            end
        end
    end

    #def xxxx_iterator_2
    def test_iterator_2
        dotest(
            TestDefinition2,
            """0 -- x
1 -- y
2 -- z""")
    end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
openwferu-0.9.10 test/ft_15_iterator.rb
openwferu-0.9.10.653 test/ft_15_iterator.rb
openwferu-0.9.7 test/ft_15_iterator.rb
openwferu-0.9.8 test/ft_15_iterator.rb
openwferu-0.9.9 test/ft_15_iterator.rb