Sha256: e3dc786e1a66165d560ec1bf7a18108494286d7b76a047419f44e9c7e10ebf36

Contents?: true

Size: 934 Bytes

Versions: 15

Compression:

Stored size: 934 Bytes

Contents

# encoding: ASCII-8BIT
require 'helper'
require 'wsdl/parser'
require 'wsdl/soap/classDefCreator'
require 'wsdl/soap/classNameCreator'


module WSDL


class TestMultipleFault < Test::Unit::TestCase
  def self.setup(filename)
    @@filename = filename
  end

  def test_multiplefault
    @wsdl = WSDL::Parser.new.parse(File.open(@@filename) { |f| f.read })
    name_creator = WSDL::SOAP::ClassNameCreator.new
    classdefstr = WSDL::SOAP::ClassDefCreator.new(@wsdl, name_creator).dump
    yield_eval_binding(classdefstr) do |b|
      assert_equal(
	WSDL::TestMultipleFault::AuthenticationError,
	eval("AuthenticationError", b)
      )
      assert_equal(
	WSDL::TestMultipleFault::AuthorizationError,
	eval("AuthorizationError", b)
      )
    end
  end

  def yield_eval_binding(evaled)
    b = binding
    eval(evaled, b)
    yield(b)
  end
end

TestMultipleFault.setup(File.join(File.dirname(__FILE__), 'multiplefault.wsdl'))


end

Version data entries

15 entries across 15 versions & 9 rubygems

Version Path
malagant-soap4r-1.5.8.20141127181857 test/wsdl/test_multiplefault.rb
rtiss_soap4r-1.6.1 test/wsdl/test_multiplefault.rb
rtiss_soap4r-1.6.0 test/wsdl/test_multiplefault.rb
eSpace_soap4r-1.5.8 test/wsdl/test_multiplefault.rb
soap4r-ruby19-1.5.9 test/wsdl/test_multiplefault.rb
tomdz-soap4r-1.5.8.20120202093209 test/wsdl/test_multiplefault.rb
soap5r-2.0.3 test/wsdl/test_multiplefault.rb
soap5r-2.0.2 test/wsdl/test_multiplefault.rb
soap5r-2.0.1 test/wsdl/test_multiplefault.rb
soap5r-2.0.0 test/wsdl/test_multiplefault.rb
soap5r-2.0.0.20120130130121 test/wsdl/test_multiplefault.rb
soap4r-sgonyea-1.5.9 test/wsdl/test_multiplefault.rb
sunteya-soap4r-1.5.8.0 test/wsdl/test_multiplefault.rb
tomdz-soap4r-1.5.8.20111103171510 test/wsdl/test_multiplefault.rb
rubyjedi-soap4r-1.5.8.20100619003610 test/wsdl/test_multiplefault.rb