Skip to content

Add support for Mocking #196

Open
Open
@ghost

Description

As far as I can tell, all IFirebaseServices are sealed and have internal constructors.

This presents us with the challenge of how we can test code, which uses the FirebaseAdminSdk, which contains very critical operations.
I ask you to re-evaluate this design decision, as mocking is required to achieve a high test coverage of our own code, which interfaces with FirebaseAdmin SDK directly.

In my project, I was able to identify two critical firebase services, which lack mockability:

  • FirebaseAdmin.Messaging.FirebaseMessaging
  • FirebaseAdmin.Auth.FirebaseAuth

My environment:

  • .Net Core 3.1
  • NUnit 3.12.0
  • Moq 4.14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions