class PactJUnitFormatter::PactExample
Attributes
contract[R]
example[R]
notification[R]
Public Class Methods
new(notification)
click to toggle source
# File lib/pact_junit_formatter.rb, line 98 def initialize(notification) @notification = notification @example = notification.example @contract = JSON.parse(example.metadata[:pact_json]) end
Public Instance Methods
classname()
click to toggle source
# File lib/pact_junit_formatter.rb, line 124 def classname "#{package_name}.#{interaction_name}" end
consumer_name()
click to toggle source
# File lib/pact_junit_formatter.rb, line 104 def consumer_name @contract['consumer']['name'] end
description()
click to toggle source
# File lib/pact_junit_formatter.rb, line 116 def description @example.full_description.match(/(returns\s+.+)\z/)[1] end
interaction_name()
click to toggle source
# File lib/pact_junit_formatter.rb, line 112 def interaction_name @example.metadata[:pact_interaction_example_description] end
package_name()
click to toggle source
# File lib/pact_junit_formatter.rb, line 120 def package_name "#{consumer_name}-#{provider_name}" end
provider_name()
click to toggle source
# File lib/pact_junit_formatter.rb, line 108 def provider_name @contract['provider']['name'] end
run_time()
click to toggle source
# File lib/pact_junit_formatter.rb, line 132 def run_time @example.execution_result.run_time end
started_at()
click to toggle source
# File lib/pact_junit_formatter.rb, line 136 def started_at @example.execution_result.started_at end
status()
click to toggle source
# File lib/pact_junit_formatter.rb, line 128 def status @example.execution_result.status end