# # Testing OpenWFEru # # John Mettraux at openwfe.org # Pat at geobliki.com # require 'flowtestbase' require 'openwfe/def' include OpenWFE class FlowTest50 < Test::Unit::TestCase include FlowTestBase #def setup #end #def teardown #end # # A Test by Pat Cappelaere # PAT_XML = < 106 2007-04-16 09:20:00 27.41 NADIR 52 186 2600.85 2007-04-16T09:20:00Z END class TestXmlAttribute50a0 < ProcessDefinition sequence do geo_0 geo_1 end end #def xxxx_0 def test_0 doc0 = nil doc1 = nil @engine.register_participant :geo_0 do |fei, workitem| doc0 = REXML::Document.new(PAT_XML) workitem.attributes['xml'] = doc0 @tracer << "0\n" end @engine.register_participant :geo_1 do |fei, workitem| doc1 = workitem.attributes['xml'] @tracer << "1\n" end dotest(TestXmlAttribute50a0, "0\n1") assert_equal doc0.to_s, doc1.to_s end def test_1 doc0 = REXML::Document.new PAT_XML doc1 = OpenWFE::fulldup(doc0) assert_not_equal doc0.object_id, doc1.object_id assert_equal doc0.to_s, doc1.to_s end end