Skip to content

Add Override Equals method to softButtonObject#1307

Merged
bilal-alsharifi merged 15 commits intodevelopfrom
bugfix/issue_1257_2.0
Mar 19, 2020
Merged

Add Override Equals method to softButtonObject#1307
bilal-alsharifi merged 15 commits intodevelopfrom
bugfix/issue_1257_2.0

Conversation

@JulianKast
Copy link
Copy Markdown
Contributor

@JulianKast JulianKast commented Mar 12, 2020

Fixes #1257

This PR is ready for review.

Risk

This PR makes minor API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).
  • I have tested Android, Java SE, and Java EE

Unit Tests

Added testSoftButtonEq() and testSoftButtonStateEq() to SoftButtonManagerTests and testSdlFIleEq() to FileManagerTest

Core Tests

Tested using manticore

Summary

Added a method in SdlFile in android and JavaSE, softButtonObjects, and SoftButtonState that overrides their equals methods. The new equals methods compare the objects variables instead of their memory address.

Enhancements
  • Added a method in softButtonObjects that overrides its equals method.
  • Added a method in softButtonState that overrides its equals method.
  • Added a method in SdlFile that overrides its equals method for android and JavaSE.

CLA

@JulianKast JulianKast changed the title Bugfix/issue 1257 2.0 Add Override Equals method to softButtonObject Mar 12, 2020
@JulianKast JulianKast changed the base branch from master to develop March 12, 2020 18:26
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2020

Codecov Report

Merging #1307 into develop will increase coverage by 0.03%.
The diff coverage is 72.72%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1307      +/-   ##
=============================================
+ Coverage      47.56%   47.60%   +0.03%     
- Complexity      4391     4404      +13     
=============================================
  Files            488      488              
  Lines          23735    23754      +19     
  Branches        2737     2749      +12     
=============================================
+ Hits           11290    11308      +18     
+ Misses         11755    11753       -2     
- Partials         690      693       +3     
Impacted Files Coverage Δ Complexity Δ
...rtdevicelink/managers/screen/SoftButtonObject.java 63.33% <63.63%> (+2.57%) 27.00 <6.00> (+7.00)
...artdevicelink/managers/screen/SoftButtonState.java 51.35% <75.00%> (+6.52%) 12.00 <6.00> (+6.00)
...vicelink/managers/screen/choiceset/ChoiceCell.java 87.50% <100.00%> (+3.57%) 26.00 <0.00> (ø)
...smartdevicelink/managers/screen/menu/MenuCell.java 80.28% <100.00%> (+1.40%) 29.00 <0.00> (ø)

Comment thread base/src/main/java/com/smartdevicelink/managers/screen/choiceset/ChoiceCell.java Outdated
@bilal-alsharifi bilal-alsharifi merged commit 1d4d523 into develop Mar 19, 2020
@bilal-alsharifi bilal-alsharifi deleted the bugfix/issue_1257_2.0 branch March 19, 2020 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants