Class: JmlTestRunner::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/jml_test_runner/test_case.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ TestCase

Returns a new instance of TestCase.



7
8
9
10
11
12
13
14
15
16
# File 'lib/jml_test_runner/test_case.rb', line 7

def initialize(hash = {})
  @result = hash['result'].to_sym
  @path = hash['path']
  @fn = hash['fn']
  @id = hash['id']
  @iteration = hash['iteration']
  @duration = hash['duration']
  @description = hash['description']
  @message = hash['message']
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def description
  @description
end

#durationObject (readonly)

Returns the value of attribute duration.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def duration
  @duration
end

#fnObject (readonly)

Returns the value of attribute fn.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def fn
  @fn
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def id
  @id
end

#iterationObject (readonly)

Returns the value of attribute iteration.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def iteration
  @iteration
end

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def message
  @message
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def path
  @path
end

#resultObject (readonly)

Returns the value of attribute result.



5
6
7
# File 'lib/jml_test_runner/test_case.rb', line 5

def result
  @result
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/jml_test_runner/test_case.rb', line 26

def error?
  @result == :error
end

#failure?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/jml_test_runner/test_case.rb', line 22

def failure?
  @result == :failure
end

#success?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/jml_test_runner/test_case.rb', line 18

def success?
  @result == :success
end