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

Convert StorageImplTest from EasyMock to Mockito #270

Open
dmitry-fa opened this issue Apr 17, 2020 · 5 comments
Open

Convert StorageImplTest from EasyMock to Mockito #270

dmitry-fa opened this issue Apr 17, 2020 · 5 comments
Assignees
Labels
api: storage Issues related to the googleapis/java-storage API. type: cleanup An internal cleanup or hygiene concern.

Comments

@dmitry-fa
Copy link
Contributor

dmitry-fa commented Apr 17, 2020

Google requires new tests to use Mockito even if existing tests use EasyMock.
It's really hard to use two frameworks within a single test because setUp/tearDown methods invoked before and after each test perform some framework specific actions.
It's not required to convert all tests to Mockito, but the overhead of supporting both frameworks can be higher than the effort to convert existing tests.
In case of StorageImplTest, there will be many new tests developed for new Storage features, so it worths to convert these tests.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Apr 17, 2020
@dmitry-fa dmitry-fa self-assigned this Apr 17, 2020
@elharo
Copy link
Contributor

elharo commented Apr 17, 2020

You can always create a new test class that uses Mockito. There's no requirement that we only have one test class per model class.

@dmitry-fa
Copy link
Contributor Author

Two test classes per model class will lead to code duplication. Perhaps the right way to go is:

  • rename StorageImplTest.java to StorageImplTestLegacy.java
  • create new StorageImplTest.java using Mockito
  • start moving tests from legacy to modern form by portion

@meredithslota
Copy link

It looks like the bulk of this work is already done in the linked PRs — @frankyn is this ok to close out?

@frankyn
Copy link
Member

frankyn commented Oct 18, 2023

Hi @meredithslota this is still an issue to move away from EasyMock.

@frankyn frankyn assigned JesseLovelace and unassigned frankyn Oct 24, 2023
@frankyn
Copy link
Member

frankyn commented Oct 24, 2023

Passing it over to @JesseLovelace who had been working on this issue from last fixit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants