Class: Cucumber::Messages::TestStepFinished

Inherits:
Message show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Message::Utils

included

Methods included from Message::Serialization

#to_h, #to_json

Methods included from Message::Deserialization

included

Constructor Details

#initialize(test_case_started_id: '', test_step_id: '', test_step_result: TestStepResult.new, timestamp: Timestamp.new) ⇒ TestStepFinished

Returns a new instance of TestStepFinished.



1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1767

def initialize(
  test_case_started_id: '',
  test_step_id: '',
  test_step_result: TestStepResult.new,
  timestamp: Timestamp.new
)
  @test_case_started_id = test_case_started_id
  @test_step_id = test_step_id
  @test_step_result = test_step_result
  @timestamp = timestamp
end

Instance Attribute Details

#test_case_started_idObject (readonly)

Returns the value of attribute test_case_started_id.



1759
1760
1761
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1759

def test_case_started_id
  @test_case_started_id
end

#test_step_idObject (readonly)

Returns the value of attribute test_step_id.



1761
1762
1763
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1761

def test_step_id
  @test_step_id
end

#test_step_resultObject (readonly)

Returns the value of attribute test_step_result.



1763
1764
1765
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1763

def test_step_result
  @test_step_result
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



1765
1766
1767
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1765

def timestamp
  @timestamp
end

Class Method Details

.from_h(hash) ⇒ Object

Returns a new TestStepFinished from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::TestStepFinished.from_h(some_hash) # => #<Cucumber::Messages::TestStepFinished:0x... ...>


1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 1087

def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    test_case_started_id: hash[:testCaseStartedId],
    test_step_id: hash[:testStepId],
    test_step_result: TestStepResult.from_h(hash[:testStepResult]),
    timestamp: Timestamp.from_h(hash[:timestamp]),
  )
end