Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Convert StorageImplTest from EasyMock to Mockito #270

Description

@dmitry-fa

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.

Activity

  1. self-assigned this
    on Apr 17, 2020
  2. elharo commented on Apr 17, 2020

    @elharo
    Contributor

    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.

  3. dmitry-fa commented on Apr 17, 2020

    @dmitry-fa
    ContributorAuthor

    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
  4. added
    type: cleanupAn internal cleanup or hygiene concern.
    and removed
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Apr 22, 2020
  5. meredithslota commented on Oct 10, 2023

    @meredithslota

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

  6. frankyn commented on Oct 18, 2023

    @frankyn
    Contributor

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

  7. frankyn commented on Oct 24, 2023

    @frankyn
    Contributor

    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

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage API.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions