wasabi 3.6.1 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +7 -8
  4. data/lib/wasabi/parser.rb +3 -15
  5. data/lib/wasabi/version.rb +1 -1
  6. metadata +5 -137
  7. data/spec/fixtures/authentication.wsdl +0 -63
  8. data/spec/fixtures/brand.wsdl +0 -624
  9. data/spec/fixtures/economic.wsdl +0 -65660
  10. data/spec/fixtures/encoded_endpoint.wsdl +0 -52
  11. data/spec/fixtures/geotrust.wsdl +0 -156
  12. data/spec/fixtures/import_port_types.wsdl +0 -86
  13. data/spec/fixtures/inherited.wsdl +0 -46
  14. data/spec/fixtures/juniper.wsdl +0 -215
  15. data/spec/fixtures/lower_camel.wsdl +0 -52
  16. data/spec/fixtures/marketo.wsdl +0 -1630
  17. data/spec/fixtures/multiple_namespaces.wsdl +0 -61
  18. data/spec/fixtures/multiple_parts_in_message.wsdl +0 -66
  19. data/spec/fixtures/multiple_types.wsdl +0 -60
  20. data/spec/fixtures/namespaced_actions.wsdl +0 -307
  21. data/spec/fixtures/no_message_parts.wsdl +0 -85
  22. data/spec/fixtures/no_namespace.wsdl +0 -115
  23. data/spec/fixtures/savon295.wsdl +0 -52
  24. data/spec/fixtures/soap12.wsdl +0 -11
  25. data/spec/fixtures/symbolic_endpoint.wsdl +0 -190
  26. data/spec/fixtures/tradetracker.wsdl +0 -1330
  27. data/spec/fixtures/two_bindings.wsdl +0 -24
  28. data/spec/spec_helper.rb +0 -17
  29. data/spec/support/adapter.rb +0 -20
  30. data/spec/support/fixture.rb +0 -42
  31. data/spec/support/profiling.rb +0 -20
  32. data/spec/wasabi/core_ext/string_spec.rb +0 -39
  33. data/spec/wasabi/document/authentication_spec.rb +0 -39
  34. data/spec/wasabi/document/economic_spec.rb +0 -15
  35. data/spec/wasabi/document/encoded_endpoint_spec.rb +0 -16
  36. data/spec/wasabi/document/geotrust_spec.rb +0 -40
  37. data/spec/wasabi/document/inherited_spec.rb +0 -43
  38. data/spec/wasabi/document/multiple_namespaces_spec.rb +0 -57
  39. data/spec/wasabi/document/namespaced_actions_spec.rb +0 -41
  40. data/spec/wasabi/document/no_namespace_spec.rb +0 -41
  41. data/spec/wasabi/document/savon295_spec.rb +0 -20
  42. data/spec/wasabi/document/soap12_spec.rb +0 -16
  43. data/spec/wasabi/document/two_bindings_spec.rb +0 -31
  44. data/spec/wasabi/document_spec.rb +0 -60
  45. data/spec/wasabi/parser/get_servicename_spec.rb +0 -21
  46. data/spec/wasabi/parser/import_port_types_spec.rb +0 -24
  47. data/spec/wasabi/parser/juniper_spec.rb +0 -25
  48. data/spec/wasabi/parser/marketo_spec.rb +0 -19
  49. data/spec/wasabi/parser/multiple_namespaces_spec.rb +0 -42
  50. data/spec/wasabi/parser/multiple_parts_in_message_spec.rb +0 -33
  51. data/spec/wasabi/parser/no_message_parts_spec.rb +0 -34
  52. data/spec/wasabi/parser/no_namespace_spec.rb +0 -28
  53. data/spec/wasabi/parser/no_target_namespace_spec.rb +0 -38
  54. data/spec/wasabi/parser/softlayer_spec.rb +0 -20
  55. data/spec/wasabi/parser/symbolic_endpoint_spec.rb +0 -23
  56. data/spec/wasabi/parser/tradetracker_spec.rb +0 -19
  57. data/spec/wasabi/resolver_spec.rb +0 -57
  58. data/spec/wasabi/wasabi_spec.rb +0 -14
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Example of a WSDL with two <binding> tags.
3
-
4
- This is stripped down from a real example found in the wild, although
5
- having different operations for the SOAP 1.1 and SOAP 1.2 bindings
6
- is hypothetical (the real-world example I saw had the same operations
7
- in each binding section). -->
8
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
9
- <types>
10
- </types>
11
- <portType name="BlogSoap">
12
- </portType>
13
- <binding name="BlogSoap">
14
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
15
- <operation name="Post" />
16
- <operation name="Post11only" />
17
- </binding>
18
- <binding name="BlogSoap12">
19
- <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
20
- <operation name="Post" />
21
- <operation name="Post12only" />
22
- </binding>
23
- </definitions>
24
-
data/spec/spec_helper.rb DELETED
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler"
4
- Bundler.require :default, :development
5
-
6
- unless RUBY_PLATFORM =~ /java/
7
- require "simplecov"
8
- require "coveralls"
9
- Coveralls.wear!
10
- end
11
-
12
- support_files = File.expand_path("spec/support/**/*.rb")
13
- Dir[support_files].each { |file| require file }
14
-
15
- RSpec.configure do |config|
16
- config.include SpecSupport
17
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class FakeAdapterForTest < HTTPI::Adapter::Base
4
-
5
- register :fake_adapter_for_test
6
-
7
- def initialize(request)
8
- @@requests ||= []
9
- @@requests.push request
10
- @request = request
11
- end
12
-
13
- attr_reader :client
14
-
15
- def request(method)
16
- @@methods ||= []
17
- @@methods.push method
18
- HTTPI::Response.new(200, {}, 'wsdl_by_adapter')
19
- end
20
- end
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SpecSupport
4
-
5
- class Fixture
6
- def self.[](name)
7
- fixtures[name]
8
- end
9
-
10
- def self.[]=(name, value)
11
- fixtures[name] = value
12
- end
13
-
14
- def self.fixtures
15
- @fixtures ||= {}
16
- end
17
-
18
- def initialize(file, ext = :wsdl)
19
- self.file = file
20
- self.ext = ext
21
- end
22
-
23
- attr_accessor :file, :ext
24
-
25
- def filename
26
- "#{file}.#{ext}"
27
- end
28
-
29
- def path
30
- File.expand_path("spec/fixtures/#{filename}")
31
- end
32
-
33
- def read
34
- Fixture[filename] ||= File.read(path)
35
- end
36
- end
37
-
38
- def fixture(*args)
39
- Fixture.new(*args)
40
- end
41
-
42
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SpecSupport
4
-
5
- def benchmark(&block)
6
- require 'benchmark'
7
-
8
- puts "Benchmark:"
9
- puts Benchmark.measure(&block)
10
- end
11
-
12
- def profile_methods
13
- require 'method_profiler'
14
-
15
- profiler = MethodProfiler.observe(Wasabi::Parser)
16
- yield
17
- puts profiler.report
18
- end
19
-
20
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::CoreExt::String do
6
-
7
- describe ".snakecase" do
8
- it "lowercases one word CamelCase" do
9
- expect(Wasabi::CoreExt::String.snakecase("Merb")).to eq("merb")
10
- end
11
-
12
- it "makes one underscore snakecase two word CamelCase" do
13
- expect(Wasabi::CoreExt::String.snakecase("MerbCore")).to eq("merb_core")
14
- end
15
-
16
- it "handles CamelCase with more than 2 words" do
17
- expect(Wasabi::CoreExt::String.snakecase("SoYouWantContributeToMerbCore")).to eq("so_you_want_contribute_to_merb_core")
18
- end
19
-
20
- it "handles CamelCase with more than 2 capital letter in a row" do
21
- expect(Wasabi::CoreExt::String.snakecase("CNN")).to eq("cnn")
22
- expect(Wasabi::CoreExt::String.snakecase("CNNNews")).to eq("cnn_news")
23
- expect(Wasabi::CoreExt::String.snakecase("HeadlineCNNNews")).to eq("headline_cnn_news")
24
- end
25
-
26
- it "does NOT change one word lowercase" do
27
- expect(Wasabi::CoreExt::String.snakecase("merb")).to eq("merb")
28
- end
29
-
30
- it "leaves snake_case as is" do
31
- expect(Wasabi::CoreExt::String.snakecase("merb_core")).to eq("merb_core")
32
- end
33
-
34
- it "converts period characters to underscores" do
35
- expect(Wasabi::CoreExt::String.snakecase("User.GetEmail")).to eq("user_get_email")
36
- end
37
- end
38
-
39
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: authentication.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:authentication).read }
9
-
10
- describe '#namespace' do
11
- subject { super().namespace }
12
- it { should == "http://v1_0.ws.auth.order.example.com/" }
13
- end
14
-
15
- describe '#endpoint' do
16
- subject { super().endpoint }
17
- it { should == URI("http://example.com/validation/1.0/AuthenticationService") }
18
- end
19
-
20
- describe '#element_form_default' do
21
- subject { super().element_form_default }
22
- it { should == :unqualified }
23
- end
24
-
25
- it 'has 1 operation' do
26
- expect(subject.operations.size).to eq(1)
27
- end
28
-
29
- describe '#operations' do
30
- subject { super().operations }
31
- it do
32
- should == {
33
- :authenticate => { :input => "authenticate", :output => "authenticateResponse", :action => "authenticate", :namespace_identifier => "tns" }
34
- }
35
- end
36
- end
37
-
38
- end
39
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
-
5
- describe Wasabi::Document do
6
- context 'with: economic.wsdl' do
7
-
8
- subject { Wasabi::Document.new fixture(:economic).read }
9
-
10
- it 'has an ok parse-time for huge wsdl files' do
11
- expect(subject.operations.count).to eq(1511)
12
- end
13
-
14
- end
15
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: encoded_endpoint.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:encoded_endpoint).read }
9
-
10
- describe '#endpoint' do
11
- subject { super().endpoint }
12
- it { is_expected.to eq URI("http://localhost/soapservice/execute?path=/base/includes/Test+Soap/Return+Rows") }
13
- end
14
-
15
- end
16
- end
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: geotrust.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:geotrust).read }
9
-
10
- describe '#namespace' do
11
- subject { super().namespace }
12
- it { should == "http://api.geotrust.com/webtrust/query" }
13
- end
14
-
15
- describe '#endpoint' do
16
- subject { super().endpoint }
17
- it { should == URI("https://test-api.geotrust.com:443/webtrust/query.jws") }
18
- end
19
-
20
- describe '#element_form_default' do
21
- subject { super().element_form_default }
22
- it { should == :qualified }
23
- end
24
-
25
- it 'has 2 operations' do
26
- expect(subject.operations.size).to eq(2)
27
- end
28
-
29
- describe '#operations' do
30
- subject { super().operations }
31
- it do
32
- should include(
33
- { :get_quick_approver_list => { :input => "GetQuickApproverList", :action => "GetQuickApproverList", :parameters=>{:Request=>{:name=>"Request", :type=>"GetQuickApproverListInput"}}}},
34
- { :hello => { :input => "hello", :action => "hello", :parameters=>{:Input=>{:name=>"Input", :type=>"string"}} } }
35
- )
36
- end
37
- end
38
-
39
- end
40
- end
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: inherited.xml" do
7
-
8
- subject { Wasabi::Document.new fixture(:inherited).read }
9
-
10
- describe '#type_definitions' do
11
- subject { super().type_definitions }
12
- it do
13
- should include([["Account", "Id"], "ID"])
14
- should include([["Account", "ProcessId"], "ID"])
15
- should include([["Account", "CreatedDate"], "dateTime"])
16
- should include([["Account", "Description"], "string"])
17
- should include([["Account", "fieldsToNull"], "string"])
18
- end
19
- end
20
-
21
- it "should position base class attributes before subclass attributes in :order! array" do
22
- account = subject.parser.types["Account"]
23
- expect(account[:order!]).to eq(["fieldsToNull", "Id", "Description", "ProcessId", "CreatedDate"])
24
- end
25
-
26
- it "should have each type's hash remember it's base type in :base_type element" do
27
- account = subject.parser.types["Account"]
28
- expect(account[:base_type]).to eq("baseObject")
29
-
30
- base_object = subject.parser.types["baseObject"]
31
- expect(base_object).not_to have_key(:base_type)
32
- end
33
-
34
- it "should have element's hash contain all these attributes (:nillable, :minOccurs, :maxOccurs) in addition to :type" do
35
- base_object = subject.parser.types["baseObject"]
36
- fields_to_null = base_object["fieldsToNull"]
37
- expect(fields_to_null[:nillable]).to eq("true")
38
- expect(fields_to_null[:minOccurs]).to eq("0")
39
- expect(fields_to_null[:maxOccurs]).to eq("unbounded")
40
- end
41
- end
42
- end
43
-
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: multiple_namespaces.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:multiple_namespaces).read }
9
-
10
- describe '#namespace' do
11
- subject { super().namespace }
12
- it { is_expected.to eq "http://example.com/actions" }
13
- end
14
-
15
- describe '#endpoint' do
16
- subject { super().endpoint }
17
- it { is_expected.to eq URI("http://example.com:1234/soap") }
18
- end
19
-
20
- describe '#element_form_default' do
21
- subject { super().element_form_default }
22
- it { is_expected.to eq :qualified }
23
- end
24
-
25
- it 'has 1 operation' do
26
- expect(subject.operations.size).to eq(1)
27
- end
28
-
29
- describe '#operations' do
30
- subject { super().operations }
31
- it do
32
- is_expected.to match({ :save => { :input => "Save", :output=>"SaveResponse", :action => "http://example.com/actions.Save", :namespace_identifier => "actions", :parameters => { :article => { :name => "article", :type => "Article" } } } })
33
- end
34
- end
35
-
36
- describe '#type_namespaces' do
37
- subject { super().type_namespaces }
38
- it do
39
- is_expected.to match([
40
- [["Save"], "http://example.com/actions"],
41
- [["Save", "article"], "http://example.com/actions"],
42
- [["Article"], "http://example.com/article"],
43
- [["Article", "Author"], "http://example.com/article"],
44
- [["Article", "Title"], "http://example.com/article"]
45
- ])
46
- end
47
- end
48
-
49
- describe '#type_definitions' do
50
- subject { super().type_definitions }
51
- it do
52
- is_expected.to match([ [["Save", "article"], "Article"] ])
53
- end
54
- end
55
-
56
- end
57
- end
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: namespaced_actions.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:namespaced_actions).read }
9
-
10
- describe '#namespace' do
11
- subject { super().namespace }
12
- it { should == "http://api.example.com/api/" }
13
- end
14
-
15
- describe '#endpoint' do
16
- subject { super().endpoint }
17
- it { should == URI("https://api.example.com/api/api.asmx") }
18
- end
19
-
20
- describe '#element_form_default' do
21
- subject { super().element_form_default }
22
- it { should == :qualified }
23
- end
24
-
25
- it 'has 3 operations' do
26
- expect(subject.operations.size).to eq(3)
27
- end
28
-
29
- describe '#operations' do
30
- subject { super().operations }
31
- it do
32
- should include(
33
- { :delete_client => { :input => "Client.Delete", :output => "Client.DeleteResponse", :action => "http://api.example.com/api/Client.Delete", :namespace_identifier => "tns" } },
34
- { :get_clients => { :input => "User.GetClients", :output => "User.GetClientsResponse", :action => "http://api.example.com/api/User.GetClients", :namespace_identifier => "tns" } },
35
- { :get_api_key => { :input => "User.GetApiKey", :output => "User.GetApiKeyResponse", :action => "http://api.example.com/api/User.GetApiKey", :namespace_identifier => "tns" } }
36
- )
37
- end
38
- end
39
-
40
- end
41
- end
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: no_namespace.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:no_namespace).read }
9
-
10
- describe '#namespace' do
11
- subject { super().namespace }
12
- it { should == "urn:ActionWebService" }
13
- end
14
-
15
- describe '#endpoint' do
16
- subject { super().endpoint }
17
- it { should == URI("http://example.com/api/api") }
18
- end
19
-
20
- describe '#element_form_default' do
21
- subject { super().element_form_default }
22
- it { should == :unqualified }
23
- end
24
-
25
- it 'has 3 operations' do
26
- expect(subject.operations.size).to eq(3)
27
- end
28
-
29
- describe '#operations' do
30
- subject { super().operations }
31
- it do
32
- should include(
33
- { :get_user_login_by_id => { :input => { "GetUserLoginById" => { "api_key" => ["xsd", "string"], "id" => ["xsd", "int"] }}, :output=>{"GetUserLoginById"=>{"return"=>["xsd", "string"]}}, :action => "/api/api/GetUserLoginById", :namespace_identifier => "typens" } },
34
- { :get_all_contacts => { :input => {"GetAllContacts" => { "api_key" => ["xsd", "string"], "login"=>["xsd", "string"] }}, :output=>{"GetAllContacts"=>{"return"=>["typens", "McContactArray"]}}, :action => "/api/api/GetAllContacts", :namespace_identifier => "typens" } },
35
- { :search_user => { :input => { "SearchUser" => { "api_key" => ["xsd", "string"], "phrase"=>["xsd", "string"], "page"=>["xsd", "string"], "per_page"=>["xsd", "string"] }}, :output=>{"SearchUser"=>{"return"=>["typens", "MpUserArray"]}}, :action => "/api/api/SearchUser", :namespace_identifier => nil } }
36
- )
37
- end
38
- end
39
-
40
- end
41
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: savon295.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:savon295).read }
9
-
10
- describe '#operations' do
11
- subject { super().operations }
12
- it do
13
- should include(
14
- { :sendsms => { :input=>{"sendsms"=>{"sender"=>["xsd", "string"], "cellular"=>["xsd", "string"], "msg"=>["xsd", "string"], "smsnumgroup"=>["xsd", "string"], "emailaddr"=>["xsd", "string"], "udh"=>["xsd", "string"], "datetime"=>["xsd", "string"], "format"=>["xsd", "string"], "dlrurl"=>["xsd", "string"]}}, :output=>{"sendsms"=>{"body"=>["xsd", "string"]}}, :action => "sendsms", :namespace_identifier => 'tns' } }
15
- )
16
- end
17
- end
18
-
19
- end
20
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: soap12.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:soap12).read }
9
-
10
- describe '#endpoint' do
11
- subject { super().endpoint }
12
- it { should == URI("http://blogsite.example.com/endpoint12") }
13
- end
14
-
15
- end
16
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
- context "with: two_bindings.wsdl" do
7
-
8
- subject { Wasabi::Document.new fixture(:two_bindings).read }
9
-
10
- describe '#element_form_default' do
11
- subject { super().element_form_default }
12
- it { should == :unqualified }
13
- end
14
-
15
- it 'has 3 operations' do
16
- expect(subject.operations.size).to eq(3)
17
- end
18
-
19
- describe '#operations' do
20
- subject { super().operations }
21
- it do
22
- should include(
23
- { :post => { :input => "Post", :action => "Post" } },
24
- { :post11only => { :input => "Post11only", :action => "Post11only" } },
25
- { :post12only => { :input => "Post12only", :action => "Post12only" } }
26
- )
27
- end
28
- end
29
-
30
- end
31
- end
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Document do
6
-
7
- subject { Wasabi::Document.new fixture(:authentication).read }
8
-
9
- it "accepts a URL" do
10
- expect(HTTPI).to receive(:get) { HTTPI::Response.new(200, {}, "wsdl") }
11
-
12
- document = Wasabi::Document.new("http://example.com?wsdl")
13
- expect(document.xml).to eq("wsdl")
14
- end
15
-
16
- it "accepts a path" do
17
- document = Wasabi::Document.new fixture(:authentication).path
18
- expect(document.xml).to eq(fixture(:authentication).read)
19
- end
20
-
21
- it "accepts raw XML" do
22
- document = Wasabi::Document.new fixture(:authentication).read
23
- expect(document.xml).to eq(fixture(:authentication).read)
24
- end
25
-
26
- describe ".validate_element_form_default!" do
27
- [:unqualified, :qualified].each do |value|
28
- it "does not raise for :#{value}" do
29
- expect { Wasabi::Document.validate_element_form_default!(value) }.to_not raise_error
30
- end
31
- end
32
-
33
- it "raises if given an invalid value" do
34
- error_msg = "Invalid value for elementFormDefault: invalid\n" +
35
- "Must be one of: [:unqualified, :qualified]"
36
-
37
- expect { Wasabi::Document.validate_element_form_default!(:invalid) }.
38
- to raise_error(ArgumentError, error_msg)
39
- end
40
- end
41
-
42
- describe "#element_form_default" do
43
- it "defaults to :unqualified" do
44
- expect(subject.element_form_default).to eq(:unqualified)
45
- end
46
-
47
- [:unqualified, :qualified].each do |value|
48
- it "accepts :#{value}" do
49
- subject.element_form_default = value
50
- expect(subject.element_form_default).to eq(value)
51
- end
52
- end
53
-
54
- it "raises if set to an invalid value" do
55
- expect { subject.element_form_default = :invalid }.
56
- to raise_error(ArgumentError, /Invalid value for elementFormDefault/)
57
- end
58
- end
59
-
60
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Parser do
6
- context "with: geotrust.wsdl" do
7
-
8
- subject do
9
- parser = Wasabi::Parser.new Nokogiri::XML(xml)
10
- parser.parse
11
- parser
12
- end
13
-
14
- let(:xml) { fixture(:geotrust).read }
15
-
16
- it "returns the #service_name attribute" do
17
- expect(subject.service_name).to eq("queryDefinitions")
18
- end
19
-
20
- end
21
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Parser do
6
- context "with: import_port_types.wsdl" do
7
-
8
- subject do
9
- parser = Wasabi::Parser.new Nokogiri::XML(xml)
10
- parser.parse
11
- parser
12
- end
13
-
14
- let(:xml) { fixture(:import_port_types).read }
15
-
16
- it "does blow up when portTypes are imported" do
17
- get_customer = subject.operations[:get_customer]
18
-
19
- expect(get_customer[:input]).to eq("GetCustomer")
20
- expect(get_customer[:namespace_identifier]).to be_nil
21
- end
22
-
23
- end
24
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Wasabi::Parser do
6
- context 'with: juniper.wsdl' do
7
-
8
- subject do
9
- parser = Wasabi::Parser.new Nokogiri::XML(xml)
10
- parser.parse
11
- parser
12
- end
13
-
14
- let(:xml) { fixture(:juniper).read }
15
-
16
- it 'does not blow up when an extension base element is defined in an import' do
17
- request = subject.operations[:get_system_info_request]
18
-
19
- expect(request[:input]).to eq('GetSystemInfoRequest')
20
- expect(request[:action]).to eq('urn:#GetSystemInfoRequest')
21
- expect(request[:namespace_identifier]).to eq('impl')
22
- end
23
-
24
- end
25
- end