Skip to content

Commit f32c8e2

Browse files
authored
Merge branch 'main' into dl/map-expressions
2 parents 1b79391 + 6f5d65b commit f32c8e2

1 file changed

Lines changed: 17 additions & 38 deletions

File tree

  • firebase-firestore/src/androidTest/java/com/google/firebase/firestore

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/PipelineTest.java

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,30 +1994,20 @@ public void testNestedFields() {
19941994
Map<String, Object> hitchhikerResult;
19951995
Map<String, Object> duneResult;
19961996

1997-
switch (IntegrationTestUtil.getTargetBackend()) {
1998-
case NIGHTLY:
1999-
hitchhikerResult =
2000-
mapOfEntries(
2001-
entry("title", "The Hitchhiker's Guide to the Galaxy"),
2002-
entry("awards", ImmutableMap.of("hugo", true)));
2003-
duneResult =
2004-
mapOfEntries(entry("title", "Dune"), entry("awards", ImmutableMap.of("hugo", true)));
2005-
break;
2006-
default:
2007-
hitchhikerResult =
2008-
mapOfEntries(
2009-
entry("title", "The Hitchhiker's Guide to the Galaxy"), entry("awards.hugo", true));
2010-
duneResult = mapOfEntries(entry("title", "Dune"), entry("awards.hugo", true));
2011-
break;
2012-
}
1997+
hitchhikerResult =
1998+
mapOfEntries(
1999+
entry("title", "The Hitchhiker's Guide to the Galaxy"),
2000+
entry("awards", ImmutableMap.of("hugo", true)));
2001+
duneResult =
2002+
mapOfEntries(entry("title", "Dune"), entry("awards", ImmutableMap.of("hugo", true)));
20132003

20142004
assertThat(waitFor(execute).getResults())
20152005
.comparingElementsUsing(DATA_CORRESPONDENCE)
20162006
.containsExactly(hitchhikerResult, duneResult);
20172007
}
20182008

20192009
@Test
2020-
public void testMapGetWithFieldNameIncludingNotation() {
2010+
public void testMapGetWithFieldNameIncludingDotNotation() {
20212011
Task<Pipeline.Snapshot> execute =
20222012
firestore
20232013
.pipeline()
@@ -2032,27 +2022,16 @@ public void testMapGetWithFieldNameIncludingNotation() {
20322022

20332023
Map<String, Object> hitchhikerResult;
20342024
Map<String, Object> duneResult;
2035-
2036-
switch (IntegrationTestUtil.getTargetBackend()) {
2037-
case NIGHTLY:
2038-
hitchhikerResult =
2039-
mapOfEntries(
2040-
entry("title", "The Hitchhiker's Guide to the Galaxy"),
2041-
entry("nestedField", ImmutableMap.of("level", ImmutableMap.of())),
2042-
entry("nested", true));
2043-
duneResult =
2044-
mapOfEntries(
2045-
entry("title", "Dune"),
2046-
entry("nestedField", ImmutableMap.of("level", ImmutableMap.of())),
2047-
entry("nested", null));
2048-
break;
2049-
default:
2050-
hitchhikerResult =
2051-
mapOfEntries(
2052-
entry("title", "The Hitchhiker's Guide to the Galaxy"), entry("nested", true));
2053-
duneResult = mapOfEntries(entry("title", "Dune"));
2054-
break;
2055-
}
2025+
hitchhikerResult =
2026+
mapOfEntries(
2027+
entry("title", "The Hitchhiker's Guide to the Galaxy"),
2028+
entry("nestedField", ImmutableMap.of("level", ImmutableMap.of())),
2029+
entry("nested", true));
2030+
duneResult =
2031+
mapOfEntries(
2032+
entry("title", "Dune"),
2033+
entry("nestedField", ImmutableMap.of("level", ImmutableMap.of())),
2034+
entry("nested", null));
20562035

20572036
assertThat(waitFor(execute).getResults())
20582037
.comparingElementsUsing(DATA_CORRESPONDENCE)

0 commit comments

Comments
 (0)