Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(java): remove duplicate code in BackButtonMultipageTest #1129

Merged
merged 2 commits into from
Nov 21, 2020

Conversation

breautek
Copy link
Contributor

This is a recreation of #1038
See #1038 (comment) for why a new PR was created.

This PR contains the original commit authored by @leofernandesmo
I've added a second commit that applies a review suggestion and also mimic the changes in the androidx commit for consistency.

Platforms affected

Android

Motivation and Context

Test code may contain undesirable duplication. Solutions are similar to those for normal code duplication as described by Fowler.
Removing duplication helps maintainability of the test.

Description

I applied extract method and defined constants for duplicate strings.

Testing

Ran npm test

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@breautek breautek requested review from raphinesse and erisu November 21, 2020 02:57
@breautek breautek added this to the 9.0.1 milestone Nov 21, 2020
@codecov-io
Copy link

codecov-io commented Nov 21, 2020

Codecov Report

Merging #1129 (0ca2fd5) into master (bb7d733) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1129   +/-   ##
=======================================
  Coverage   70.97%   70.97%           
=======================================
  Files          21       21           
  Lines        1747     1747           
=======================================
  Hits         1240     1240           
  Misses        507      507           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb7d733...0ca2fd5. Read the comment docs.

@breautek breautek changed the title Remove duplicate code test test(java): remove duplicate code in BackButtonMultipageTest Nov 21, 2020
Copy link
Contributor

@raphinesse raphinesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@breautek breautek merged commit 97e2d15 into apache:master Nov 21, 2020
@breautek breautek deleted the remove-duplicate-code-test branch November 21, 2020 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants