Skip to content

Commit 4e44147

Browse files
Inline the assertion in the test method itself.
1 parent d887d18 commit 4e44147

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

firebase-config/src/test/java/com/google/firebase/remoteconfig/internal/ConfigFetchHandlerTest.java

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,18 @@ public void fetch_usesLatestCustomSignals() throws Exception {
778778
fetchCallToHttpClientUpdatesClockAndReturnsConfig(firstFetchedContainer);
779779
fetchHandler.fetch();
780780

781-
verifyCustomSignals(customSignals);
781+
verify(mockBackendFetchApiClient)
782+
.fetch(
783+
any(HttpURLConnection.class),
784+
/* instanceId= */ any(),
785+
/* instanceIdToken= */ any(),
786+
/* analyticsUserProperties= */ any(),
787+
/* lastFetchETag= */ any(),
788+
/* customHeaders= */ any(),
789+
/* firstOpenTime= */ any(),
790+
/* currentTime= */ any(),
791+
/* customSignals= */ eq(sharedPrefsClient.getCustomSignals()));
792+
assertThat(sharedPrefsClient.getCustomSignals()).isEqualTo(customSignals);
782793
}
783794

784795
private ConfigFetchHandler getNewFetchHandler(AnalyticsConnector analyticsConnector) {
@@ -985,21 +996,6 @@ private void verifyETags(@Nullable String requestETag, String responseETag) thro
985996
assertThat(sharedPrefsClient.getLastFetchETag()).isEqualTo(responseETag);
986997
}
987998

988-
private void verifyCustomSignals(Map<String, String> customSignals) throws Exception {
989-
verify(mockBackendFetchApiClient)
990-
.fetch(
991-
any(HttpURLConnection.class),
992-
/* instanceId= */ any(),
993-
/* instanceIdToken= */ any(),
994-
/* analyticsUserProperties= */ any(),
995-
/* lastFetchETag= */ any(),
996-
/* customHeaders= */ any(),
997-
/* firstOpenTime= */ any(),
998-
/* currentTime= */ any(),
999-
/* customSignals= */ eq(sharedPrefsClient.getCustomSignals()));
1000-
assertThat(sharedPrefsClient.getCustomSignals()).isEqualTo(customSignals);
1001-
}
1002-
1003999
private void loadBackendApiClient() throws Exception {
10041000
when(mockBackendFetchApiClient.createHttpURLConnection())
10051001
.thenReturn(new FakeHttpURLConnection(new URL("https://firebase.google.com")));

0 commit comments

Comments
 (0)