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

Replace mockito in GitCommandsExecutorTest #1245

Conversation

MarkEWaite
Copy link
Contributor

Replace mockito in GitCommandsExecutorTest

Use real objects instead of mock objects.

Use JUnit 4.13 assertThrows so that try / catch is not needed for exception testing.

Testing done

Confirmed that tests pass on my Linux computer with Java 21. Rely on ci.jenkins.io to test Windows with Java 17.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Sorry, something went wrong.

Use real objects instead of mock objects.

Use JUnit 4.13 assertThrows so that try / catch is not needed for
exception testing.
@MarkEWaite MarkEWaite requested a review from a team as a code owner January 17, 2025 02:32
@MarkEWaite MarkEWaite added the test Automated test addition or improvement label Jan 17, 2025
@github-actions github-actions bot added the tests Automated test addition or improvement label Jan 17, 2025
@MarkEWaite MarkEWaite added test Automated test addition or improvement and removed test Automated test addition or improvement tests Automated test addition or improvement labels Jan 17, 2025
@MarkEWaite MarkEWaite merged commit dc3c033 into jenkinsci:master Jan 17, 2025
18 checks passed
@MarkEWaite MarkEWaite deleted the replace-mockito-in-GitCommandsExecutorTest branch January 17, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Automated test addition or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant