Sha256: 5a97eccfa04062777213a2b59610ac65261f1a207830c2cc3577550c39bfa7cf

Contents?: true

Size: 855 Bytes

Versions: 3

Compression:

Stored size: 855 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
    @t.kill
    @t.join
    @client.reset_stream
  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

3 entries across 3 versions & 1 rubygems

Version Path
soap4r-1.5.5.20061022 test/soap/helloworld/test_helloworld.rb
soap4r-1.5.6 test/soap/helloworld/test_helloworld.rb
soap4r-1.5.7 test/soap/helloworld/test_helloworld.rb