Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[cloud_firestore] _CodecUtility isn't testable/mockable. #3012

Closed
sensuikan1973 opened this issue Jul 23, 2020 · 1 comment
Closed

[cloud_firestore] _CodecUtility isn't testable/mockable. #3012

sensuikan1973 opened this issue Jul 23, 2020 · 1 comment

Comments

@sensuikan1973
Copy link

sensuikan1973 commented Jul 23, 2020

For example, mocking arrayUnion with DocumentReference is impossible.

It's because _CodecUtility sees DocumentReference._deleagte.
https://github.com/FirebaseExtended/flutterfire/blob/77b27d042e766b09ba12a680697b6be38f78564d/packages/cloud_firestore/cloud_firestore/lib/src/utils/codec_utility.dart#L46-L47
delegate is private. So, we can't mock that.

Ofcourse, delegate should be private.
So, I wonder if the solution is to fix _CodecUtility testable.

@Ehesp
Copy link
Member

Ehesp commented Jan 4, 2021

Related; #4563

@firebase firebase locked and limited conversation to collaborators Jul 9, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants