Sha256: 4502575ef1c502f08dd001389d60b382d3605327dc9ffa8e472e83fc7e0b9755

Contents?: true

Size: 940 Bytes

Versions: 28

Compression:

Stored size: 940 Bytes

Contents

require 'test/unit'
require 'soap/rpc/driver'
require 'soap/rpc/standaloneServer'


module SOAP
module Fault


class TestFault < Test::Unit::TestCase

  def setup
    @client = SOAP::RPC::Driver.new(nil, 'urn:fault')
    @client.wiredump_dev = STDERR if $DEBUG
    @client.add_method("hello", "msg")
  end

  def teardown
    @client.reset_stream if @client
  end

  def test_fault
    @client.mapping_registry = SOAP::Mapping::EncodedRegistry.new
    @client.test_loopback_response << <<__XML__
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>DN cannot be empty</faultstring>
      <detail />
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
__XML__
    begin
      @client.hello("world")
      assert(false)
    rescue ::SOAP::FaultError => e
      assert_equal("DN cannot be empty", e.message)
    end
  end
end


end
end

Version data entries

28 entries across 28 versions & 11 rubygems

Version Path
mumboe-soap4r-1.6.0.pre.beta test/soap/fault/test_fault.rb
DefV-soap4r-1.5.8.2 test/soap/fault/test_fault.rb
mumboe-soap4r-1.5.8.7 test/soap/fault/test_fault.rb
teo-soap4r-1.5.9b test/soap/fault/test_fault.rb
mumboe-soap4r-1.5.8.6 test/soap/fault/test_fault.rb
soap4r-spox-1.6.0 test/soap/fault/test_fault.rb
soap4r-r19-1.5.9 test/soap/fault/test_fault.rb
mumboe-soap4r-1.5.8.5 test/soap/fault/test_fault.rb
soap4r-ruby1.9-2.0.5 test/soap/fault/test_fault.rb
soap4r-sgonyea-1.6.0 test/soap/fault/test_fault.rb
soap4r-straightjacket-1.5.9 test/soap/fault/test_fault.rb
soap4r-straightjacket-1.5.8 test/soap/fault/test_fault.rb
soap4r-ruby1.9-2.0.3 test/soap/fault/test_fault.rb
soap4r-ruby1.9-2.0.2 test/soap/fault/test_fault.rb
soap4r-ruby1.9-2.0.1 test/soap/fault/test_fault.rb
mumboe-soap4r-1.5.8.4 test/soap/fault/test_fault.rb
soap4r-ruby1.9-2.0.0 test/soap/fault/test_fault.rb
hands-soap4r-1.5.8.4 test/soap/fault/test_fault.rb
soap4r-ruby1.9-1.0.0 test/soap/fault/test_fault.rb
rubyjedi-soap4r-1.5.8.01 test/soap/fault/test_fault.rb