spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.55k stars 5.79k forks source link

Refactoring Test Code to Reduce Duplication of Mock Object Creation for Issue#14768 #15256

Open gzhao9 opened 1 week ago

gzhao9 commented 1 week ago

Hi there,

This PR is to address issue #14768, which involves reducing repeated mock object creation in tests.

Although my issue submission mentioned 4 separate draft PRs, I combined them into this PR, since they all address the same problem.

If you prefer these changes to be split into separate PRs, please let me know, and I will gladly close this PR and submit individual ones.

pivotal-cla commented 1 week ago

@gzhao9 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla commented 1 week ago

@gzhao9 Thank you for signing the Contributor License Agreement!

jzheaux commented 1 day ago

Hi, @gzhao9. Will you please squash your commits so that there are only 4 in the PR?

gzhao9 commented 1 day ago

Hi, @gzhao9. Will you please squash your commits so that there are only 4 in the PR?

I've squashed it and only have 4 commits, which correspond to the 4 examples I mentioned in issue #14768.