Class: GovukMessageQueueConsumer::MockMessage
- Defined in:
- lib/govuk_message_queue_consumer/test_helpers/mock_message.rb
Instance Attribute Summary collapse
-
#acked ⇒ Object
(also: #acked?)
readonly
Returns the value of attribute acked.
-
#delivery_info ⇒ Object
readonly
Returns the value of attribute delivery_info.
-
#discarded ⇒ Object
(also: #discarded?)
readonly
Returns the value of attribute discarded.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#retried ⇒ Object
(also: #retried?)
readonly
Returns the value of attribute retried.
Attributes inherited from Message
Instance Method Summary collapse
- #ack ⇒ Object
- #discard ⇒ Object
-
#initialize(payload = {}, headers = {}, delivery_info = {}) ⇒ MockMessage
constructor
A new instance of MockMessage.
- #retry ⇒ Object
Constructor Details
#initialize(payload = {}, headers = {}, delivery_info = {}) ⇒ MockMessage
Returns a new instance of MockMessage.
9 10 11 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 9 def initialize(payload = {}, headers = {}, delivery_info = {}) super(payload, OpenStruct.new(headers), OpenStruct.new(delivery_info)) end |
Instance Attribute Details
#acked ⇒ Object (readonly) Also known as: acked?
Returns the value of attribute acked.
3 4 5 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 3 def acked @acked end |
#delivery_info ⇒ Object (readonly)
Returns the value of attribute delivery_info.
3 4 5 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 3 def delivery_info @delivery_info end |
#discarded ⇒ Object (readonly) Also known as: discarded?
Returns the value of attribute discarded.
3 4 5 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 3 def discarded @discarded end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
3 4 5 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 3 def header @header end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
3 4 5 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 3 def payload @payload end |
#retried ⇒ Object (readonly) Also known as: retried?
Returns the value of attribute retried.
3 4 5 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 3 def retried @retried end |
Instance Method Details
#ack ⇒ Object
13 14 15 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 13 def ack @acked = true end |
#discard ⇒ Object
21 22 23 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 21 def discard @discarded = true end |
#retry ⇒ Object
17 18 19 |
# File 'lib/govuk_message_queue_consumer/test_helpers/mock_message.rb', line 17 def retry @retried = true end |