GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unit test firestore: Mocking DocumentReference and CollectionReference · Issue #3263 · googleapis/google-cloud-java

Unit test firestore: Mocking DocumentReference and CollectionReference #3263

New issue
Copy link
New issue
Copy link
Closed
Closed
Unit test firestore: Mocking DocumentReference and CollectionReference#3263
Copy link
Assignees
schmidt-sebastian
Labels
api: firestoreIssues related to the Firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@einevea
einevea
opened on May 14, 2018
Issue body actions

We are trying to test classes with dependencies on firestore and we found we cannot mock these classes because their constructors are internal. Is it possible if the following methods return interfaces instead of classes:

val collectionReference:CollectionReference = db.collection(collectionName)
val document: DocumentReference = collectionReference.document(docId)

Activity

  1. pongad
    assigned
    schmidt-sebastian
    on May 15, 2018
  2. schmidt-sebastian commented on May 16, 2018

    @schmidt-sebastian
    schmidt-sebastian
    on May 16, 2018
    Contributor
    More actions

    Thanks for sending this over. I filed an internal issue and will update you as we make progress.

  3. JustinBeckwith
    added
    triage meI really want to be triaged.
    🚨 criticalP0 critical issue. Requires immediate fix
    on Jun 8, 2018
  4. yihanzhen
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    status: blockedResolving the issue is dependent on other work.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    api: firestoreIssues related to the Firestore API.
    and removed
    triage meI really want to be triaged.
    🚨 criticalP0 critical issue. Requires immediate fix
    on Jun 11, 2018
  5. mustafaakin commented on Jul 11, 2018

    @mustafaakin
    mustafaakin
    on Jul 11, 2018
    More actions

    We need them too for unit testing purposes

  6. schmidt-sebastian
    closed this as completedin #3562on Aug 15, 2018
  7. abchugh commented on Aug 8, 2019

    @abchugh
    abchugh
    on Aug 8, 2019
    More actions

    Looks like the constructor of CollectionReference was missed in the fix

  8. schmidt-sebastian commented on Aug 8, 2019

    @schmidt-sebastian
    schmidt-sebastian
    on Aug 8, 2019
    Contributor
    More actions

    Follow up PR: #6054

  9. suztomo
    added a commit that references this issue on Mar 9, 2026

    build(deps): update dependency org.apache.maven.plugins:maven-shade-p…

    9ef933a
  10. chingor13
    added 3 commits that reference this issue on Mar 24, 2026

    deps: update netty dependencies to v4.1.114.final (#3263)

    b7635cb

    chore(main): release 2.47.0 (#3261)

    25e9c85

    test: update TEST_BENCH backend Storage control boostrapping to set t…

    234ca68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @schmidt-sebastian
    schmidt-sebastian

Labels

api: firestoreIssues related to the Firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.