firebase / firebase/firebase-admin-dotnet

Add support for Mocking

Open
#196 5 comments 24 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
408
Forks
146
Avg merge
22h 7m
Merged PRs (30d)
1

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.