File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
firestore/src/test/java/com/example/firestore/snippets Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 28
28
import com .google .cloud .firestore .FirestoreOptions ;
29
29
import com .google .cloud .firestore .QuerySnapshot ;
30
30
import java .util .ArrayList ;
31
+ import java .util .HashMap ;
31
32
import java .util .HashSet ;
32
33
import java .util .List ;
33
34
import java .util .Map ;
@@ -104,7 +105,9 @@ public void testRetrieveAllDocuments() throws Exception {
104
105
@ Test
105
106
public void testGetSubcollections () throws Exception {
106
107
// Add a landmark subcollection
107
- db .document ("cities/SF/landmarks/example" ).set (new Object ()).get ();
108
+ Map <String , String > data = new HashMap <>();
109
+ data .put ("foo" , "bar" );
110
+ db .document ("cities/SF/landmarks/example" ).set (data ).get ();
108
111
109
112
Iterable <CollectionReference > collections =
110
113
retrieveDataSnippets .getCollections ();
You can’t perform that action at this time.
0 commit comments