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.



408
409
410
411
# File 'lib/xcresult/models.rb', line 408

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.



407
408
409
# File 'lib/xcresult/models.rb', line 407

def test_case_name
  @test_case_name
end

Instance Method Details

#failure_messageObject



413
414
415
416
417
418
419
420
421
# File 'lib/xcresult/models.rb', line 413

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