Module: TestBench::Session::Controls::Events::TestStarted

Extended by:
Telemetry::Controls::Event::EventData
Defined in:
lib/test_bench/session/controls/events/test_started.rb

Defined Under Namespace

Modules: NoTitle, Random

Class Method Summary collapse

Class Method Details

.example(title: nil, process_id: nil, time: nil) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/test_bench/session/controls/events/test_started.rb', line 8

def self.example(title: nil, process_id: nil, time: nil)
  process_id ||= self.process_id
  time ||= self.time

  if title == :none
    title = nil
  else
    title ||= self.title
  end

  Session::Events::TestStarted.build(title, process_id:, time:)
end

.process_idObject



29
30
31
# File 'lib/test_bench/session/controls/events/test_started.rb', line 29

def self.process_id
  ProcessID.example
end

.randomObject



21
22
23
# File 'lib/test_bench/session/controls/events/test_started.rb', line 21

def self.random
  Random.example
end

.timeObject



33
34
35
# File 'lib/test_bench/session/controls/events/test_started.rb', line 33

def self.time
  Time.example
end

.titleObject



25
26
27
# File 'lib/test_bench/session/controls/events/test_started.rb', line 25

def self.title
  Title::Test.example
end