module EntitySnapshot::EventStore::Controls::Write

Public Class Methods

batch(stream_name: nil, category: nil, count: nil, starting_number: nil) click to toggle source
# File lib/entity_snapshot/event_store/controls/write.rb, line 5
def self.batch(stream_name: nil, category: nil, count: nil, starting_number: nil)
  stream_name ||= Controls::StreamName.example(category: category)

  write = ::Messaging::EventStore::Write.build

  batch = Batch.example(count: count, starting_number: starting_number)

  write.(batch, stream_name)

  stream_name
end