Sha256: 59ad8019320a5b57bafd890ee7a22368f3c516c8b6d0b02b8f819a32e8aa2d78

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

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

require 'openwfe/workitem'
require 'openwfe/engine/engine'
require 'openwfe/expressions/raw_prog'
require 'openwfe/participants/participants'
require 'openwfe/participants/enoparticipants'
require 'flowtestbase'

include OpenWFE


class EnoTest < Test::Unit::TestCase

    #def setup
    #end

    #def teardown
    #end

    #
    # Test 0
    #

    class TestDefinition0 < ProcessDefinition
        def make
            process_definition :name => "eno", :revision => "0" do
                email_notification_participant
            end
        end
    end

    def test_eno

        puts "  TARGET is #{ENV['TARGET']}"

        engine = Engine.new

        eno = EmailNotificationParticipant.new(
            "mail.google.com",
            25, 
            "eno@outoftheblue.co.jp") do | fexp, part, wi |

            s = ""

            s << "Subject: test 0\n\n"

            s << "konnichiwa.\n\n"

            return s
        end

        engine.register_participant("email_notification_participant", eno)

        li = LaunchItem.new(TestDefinition0)

        li.email_target = ENV["TARGET"]

        engine.launch(li)
    end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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