Class: XCResult::TestFailureIssueSummary

Inherits:
IssueSummary show all
Defined in:
lib/xcresult/models.rb

Overview

  • TestFailureIssueSummary

    • Supertype: IssueSummary

    • Kind: object

    • Properties: + testCaseName: String

Instance Attribute Summary collapse

Attributes inherited from IssueSummary

#document_location_in_creating_workspace, #issue_type, #message, #producing_target

Attributes inherited from AbstractObject

#type

Instance Method Summary collapse

Methods inherited from AbstractObject

#fetch_value, #fetch_values

Constructor Details

#initialize(data) ⇒ TestFailureIssueSummary

Returns a new instance of TestFailureIssueSummary.



413
414
415
416
# File 'lib/xcresult/models.rb', line 413

def initialize(data)
  self.test_case_name = fetch_value(data, 'testCaseName')
  super
end

Instance Attribute Details

#test_case_nameObject

Returns the value of attribute test_case_name.



412
413
414
# File 'lib/xcresult/models.rb', line 412

def test_case_name
  @test_case_name
end

Instance Method Details

#failure_messageObject



418
419
420
421
422
423
424
425
426
# File 'lib/xcresult/models.rb', line 418

def failure_message
  new_message = message
  if document_location_in_creating_workspace
    file_path = document_location_in_creating_workspace.url.gsub('file://', '')
    new_message += " (#{file_path})"
  end

  new_message
end