Sha256: f089e595dbd1a7d1e8d89cae0e8c9968ce4c784de9d20bb84eb1acda6d1fd13b

Contents?: true

Size: 899 Bytes

Versions: 30

Compression:

Stored size: 899 Bytes

Contents

require 'test/unit'
require 'soap/rpc/driver'
require 'hw_s.rb'


module SOAP
module HelloWorld


class TestHelloWorld < Test::Unit::TestCase
  Port = 17171

  def setup
    @server = HelloWorldServer.new('hws', 'urn:hws', '0.0.0.0', Port)
    @server.level = Logger::Severity::ERROR
    @t = Thread.new {
      Thread.current.abort_on_exception = true
      @server.start
    }
    @endpoint = "http://localhost:#{Port}/"
    @client = SOAP::RPC::Driver.new(@endpoint, 'urn:hws')
    @client.wiredump_dev = STDERR if $DEBUG
    @client.add_method("hello_world", "from")
  end

  def teardown
    @server.shutdown if @server
    if @t
      @t.kill
      @t.join
    end
    @client.reset_stream if @client
  end

  def test_hello_world
    assert_equal("Hello World, from NaHi", @client.hello_world("NaHi"))
    assert_equal("Hello World, from <&>", @client.hello_world("<&>"))
  end
end


end
end

Version data entries

30 entries across 30 versions & 13 rubygems

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