Class: Cucumber::Messages::TestCaseFinished

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: '', timestamp: Timestamp.new, will_be_retried: false) ⇒ TestCaseFinished

Returns a new instance of TestCaseFinished.



1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1642

def initialize(
  test_case_started_id: '',
  timestamp: Timestamp.new,
  will_be_retried: false
)
  @test_case_started_id = test_case_started_id
  @timestamp = timestamp
  @will_be_retried = will_be_retried
end

Instance Attribute Details

#test_case_started_idObject (readonly)

Returns the value of attribute test_case_started_id.



1636
1637
1638
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1636

def test_case_started_id
  @test_case_started_id
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



1638
1639
1640
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1638

def timestamp
  @timestamp
end

#will_be_retriedObject (readonly)

Returns the value of attribute will_be_retried.



1640
1641
1642
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1640

def will_be_retried
  @will_be_retried
end

Class Method Details

.from_h(hash) ⇒ Object

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

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


1004
1005
1006
1007
1008
1009
1010
1011
1012
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 1004

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

  self.new(
    test_case_started_id: hash[:testCaseStartedId],
    timestamp: Timestamp.from_h(hash[:timestamp]),
    will_be_retried: hash[:willBeRetried],
  )
end