Class: WireMockMapper::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/configuration.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.request_builderObject (readonly)

Returns the value of attribute request_builder.



15
16
17
# File 'lib/configuration.rb', line 15

def request_builder
  @request_builder
end

.response_builderObject (readonly)

Returns the value of attribute response_builder.



15
16
17
# File 'lib/configuration.rb', line 15

def response_builder
  @response_builder
end

.scenario_builderObject (readonly)

Returns the value of attribute scenario_builder.



15
16
17
# File 'lib/configuration.rb', line 15

def scenario_builder
  @scenario_builder
end

.wiremock_headersObject (readonly)

Returns the value of attribute wiremock_headers.



15
16
17
# File 'lib/configuration.rb', line 15

def wiremock_headers
  @wiremock_headers
end

.wiremock_urlObject (readonly)

Returns the value of attribute wiremock_url.



15
16
17
# File 'lib/configuration.rb', line 15

def wiremock_url
  @wiremock_url
end

Class Method Details

.create_global_mapping {|@request_builder, @response_builder, @scenario_builder| ... } ⇒ Object

Add mappings to include for all future mappings



18
19
20
# File 'lib/configuration.rb', line 18

def create_global_mapping
  yield @request_builder, @response_builder, @scenario_builder
end

.reset_global_mappingsObject



22
23
24
25
26
# File 'lib/configuration.rb', line 22

def reset_global_mappings
  @request_builder = Builders::RequestBuilder.new
  @response_builder = Builders::ResponseBuilder.new
  @scenario_builder = Builders::ScenarioBuilder.new
end

.set_wiremock_headers(headers) ⇒ Object

Set the WireMock headers

Parameters:

  • headers (hash)

    all the header that we need to set for wiremock



36
37
38
# File 'lib/configuration.rb', line 36

def set_wiremock_headers(headers)
  @wiremock_headers = headers
end

.set_wiremock_url(url) ⇒ Object

Set the WireMock url

Parameters:

  • url (String)

    the url of the WireMock server



30
31
32
# File 'lib/configuration.rb', line 30

def set_wiremock_url(url)
  @wiremock_url = url
end