diff options
| author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-03 15:38:36 +0000 |
|---|---|---|
| committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-03 15:38:36 +0000 |
| commit | 6133b96d61c705c7aefdf6f577f0da5796bc522d (patch) | |
| tree | ce6b571d063d031d1b5cba3ba7671ca138405a3a /test/wsdl/test_multiplefault.rb | |
| parent | 70105b2706511a6358a32b805fb55f187e942698 (diff) | |
| download | ruby-6133b96d61c705c7aefdf6f577f0da5796bc522d.tar.gz ruby-6133b96d61c705c7aefdf6f577f0da5796bc522d.tar.xz ruby-6133b96d61c705c7aefdf6f577f0da5796bc522d.zip | |
This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/wsdl/test_multiplefault.rb')
| -rw-r--r-- | test/wsdl/test_multiplefault.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/wsdl/test_multiplefault.rb b/test/wsdl/test_multiplefault.rb new file mode 100644 index 000000000..7004297dc --- /dev/null +++ b/test/wsdl/test_multiplefault.rb @@ -0,0 +1,39 @@ +require 'test/unit' +require 'wsdl/parser' +require 'wsdl/soap/classDefCreator' + + +module WSDL + + +class TestMultipleFault < Test::Unit::TestCase + def self.setup(filename) + @@filename = filename + end + + def test_multiplefault + @wsdl = WSDL::Parser.new.parse(File.open(@@filename) { |f| f.read }) + classdefstr = WSDL::SOAP::ClassDefCreator.new(@wsdl).dump + yield_eval_binding(classdefstr) do |b| + assert_equal( + WSDL::TestMultipleFault::AuthenticationError, + eval("AuthenticationError", b) + ) + assert_equal( + WSDL::TestMultipleFault::AuthorizationError, + eval("AuthorizationError", b) + ) + end + end + + def yield_eval_binding(evaled) + b = binding + eval(evaled, b) + yield(b) + end +end + +TestMultipleFault.setup(File.join(File.dirname(__FILE__), 'multiplefault.wsdl')) + + +end |
