Class: Cucumber::Messages::TestCase
- 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
Overview
Represents the TestCase message in Cucumber’s message protocol.
//// TestCases
*
A `TestCase` contains a sequence of `TestStep`s.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#pickle_id ⇒ Object
readonly
The ID of the ‘Pickle` this `TestCase` is derived from.
-
#test_steps ⇒ Object
readonly
Returns the value of attribute test_steps.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new TestCase from the given hash.
Instance Method Summary collapse
-
#initialize(id: '', pickle_id: '', test_steps: []) ⇒ TestCase
constructor
A new instance of TestCase.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(id: '', pickle_id: '', test_steps: []) ⇒ TestCase
Returns a new instance of TestCase.
1489 1490 1491 1492 1493 1494 1495 1496 1497 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1489 def initialize( id: '', pickle_id: '', test_steps: [] ) @id = id @pickle_id = pickle_id @test_steps = test_steps end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
1480 1481 1482 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1480 def id @id end |
#pickle_id ⇒ Object (readonly)
The ID of the ‘Pickle` this `TestCase` is derived from.
1485 1486 1487 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1485 def pickle_id @pickle_id end |
#test_steps ⇒ Object (readonly)
Returns the value of attribute test_steps.
1487 1488 1489 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1487 def test_steps @test_steps end |
Class Method Details
.from_h(hash) ⇒ Object
900 901 902 903 904 905 906 907 908 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 900 def self.from_h(hash) return nil if hash.nil? self.new( id: hash[:id], pickle_id: hash[:pickleId], test_steps: hash[:testSteps]&.map { |item| TestStep.from_h(item) }, ) end |