Sha256: 4dc4c35c231a36259c82f8f1ffc3482c8027cca036af8a6b0d72c28842b3c620

Contents?: true

Size: 1.21 KB

Versions: 1

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/enoparticipant'
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

1 entries across 1 versions & 1 rubygems

Version Path
openwferu-0.9.5 test/eno_test.rb