Class: Sapphire::Testing::ScenarioResult

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/Testing/ScenarioResult.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ ScenarioResult

Returns a new instance of ScenarioResult.



11
12
13
14
15
16
17
18
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 11

def initialize(text)
  @text = text
  @results = []
  @leaf = true
  @myId = -1
  @type = 'pass'
  @time = 0
end

Instance Attribute Details

#myIdObject

Returns the value of attribute myId.



6
7
8
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 6

def myId
  @myId
end

#parentObject (readonly)

Returns the value of attribute parent.



9
10
11
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 9

def parent
  @parent
end

#resultsObject (readonly)

Returns the value of attribute results.



5
6
7
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 5

def results
  @results
end

#timeObject (readonly)

Returns the value of attribute time.



8
9
10
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 8

def time
  @time
end

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 7

def type
  @type
end

Instance Method Details

#AddChild(result) ⇒ Object



20
21
22
23
24
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 20

def AddChild(result)
  result.parent = self
  @results << result
  @time += result.time
end

#set_id(id) ⇒ Object



26
27
28
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 26

def set_id(id)
  @myId = id
end

#set_type(type) ⇒ Object



30
31
32
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 30

def set_type(type)
  @type = type
end