File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
main/java/com/google/firebase/firestore/model
testUtil/java/com/google/firebase/firestore Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -677,6 +677,7 @@ internal object Values {
677677 is GeoPoint -> encodeValue(value)
678678 is Blob -> encodeValue(value)
679679 is DocumentReference -> encodeValue(value)
680+ is VectorValue -> encodeValue(value)
680681 else -> throw IllegalArgumentException (" Unexpected type: $value " )
681682 }
682683 }
Original file line number Diff line number Diff line change 1515package com .google .firebase .firestore ;
1616
1717import static org .mockito .Mockito .mock ;
18+ import static org .mockito .Mockito .when ;
1819
20+ import com .google .firebase .firestore .model .DatabaseId ;
1921import com .google .firebase .firestore .model .DocumentKey ;
2022
2123public final class TestAccessHelper {
2224
2325 /** Makes the DocumentReference constructor accessible. */
2426 public static DocumentReference createDocumentReference (DocumentKey documentKey ) {
2527 // We can use mock here because the tests only use this as a wrapper for documentKeys.
26- return new DocumentReference (documentKey , mock (FirebaseFirestore .class ));
28+ FirebaseFirestore mock = mock (FirebaseFirestore .class );
29+ when (mock .getDatabaseId ()).thenReturn (DatabaseId .forProject ("project" ));
30+ return new DocumentReference (documentKey , mock );
2731 }
2832
2933 /** Makes the getKey() method accessible. */
You can’t perform that action at this time.
0 commit comments