diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 08:14:57 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 08:14:57 +0000 |
commit | 889c7de09d40ebdd3620cf9c0ad74d750b512221 (patch) | |
tree | 6c16302232c2b655cfd5ea406a9ac202814a8b35 /test/wsdl/datetime/test_datetime.rb | |
parent | efed292c4311c8c182a32ac2afe70c6969815b2d (diff) | |
download | ruby-889c7de09d40ebdd3620cf9c0ad74d750b512221.tar.gz |
Mon Dec 24 17:06:37 2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* {lib,test}/{soap,wsdl,xsd}: removed soap4r along to the discussion
at ruby-core and ruby-dev. see [ruby-core:12535], [ruby-dev:31969].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/wsdl/datetime/test_datetime.rb')
-rw-r--r-- | test/wsdl/datetime/test_datetime.rb | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/test/wsdl/datetime/test_datetime.rb b/test/wsdl/datetime/test_datetime.rb deleted file mode 100644 index 7652318205..0000000000 --- a/test/wsdl/datetime/test_datetime.rb +++ /dev/null @@ -1,82 +0,0 @@ -require 'test/unit' -require 'soap/wsdlDriver' -require 'DatetimeService.rb' - - -module WSDL -module Datetime - - -class TestDatetime < Test::Unit::TestCase - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_client - end - - def setup_server - @server = DatetimePortTypeApp.new('Datetime server', nil, '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @t = Thread.new { - Thread.current.abort_on_exception = true - @server.start - } - end - - def setup_client - wsdl = File.join(DIR, 'datetime.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.generate_explicit_type = true - @client.wiredump_dev = STDOUT if $DEBUG - end - - def teardown - teardown_server - teardown_client - end - - def teardown_server - @server.shutdown - @t.kill - @t.join - end - - def teardown_client - @client.reset_stream - end - - def test_datetime - d = DateTime.now - d1 = d + 1 - d2 = @client.now(d) - assert_equal(d1.year, d2.year) - assert_equal(d1.month, d2.month) - assert_equal(d1.day, d2.day) - assert_equal(d1.hour, d2.hour) - assert_equal(d1.min, d2.min) - assert_equal(d1.sec, d2.sec) - assert_equal(d1.sec, d2.sec) - end - - def test_time - d = DateTime.now - t = Time.gm(d.year, d.month, d.day, d.hour, d.min, d.sec) - d1 = d + 1 - d2 = @client.now(t) - assert_equal(d1.year, d2.year) - assert_equal(d1.month, d2.month) - assert_equal(d1.day, d2.day) - assert_equal(d1.hour, d2.hour) - assert_equal(d1.min, d2.min) - assert_equal(d1.sec, d2.sec) - assert_equal(d1.sec, d2.sec) - end -end - - -end -end |