Sha256: 15bac8da60aba8a1ed64e5f90c68dc57c8d0345f13ef00773e0d1e6901b6b08a

Contents?: true

Size: 960 Bytes

Versions: 15

Compression:

Stored size: 960 Bytes

Contents

# encoding: ASCII-8BIT
require 'helper'
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

15 entries across 15 versions & 9 rubygems

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