Skip to content

Commit

Permalink
fix: Improve error messages in tests (#1855)
Browse files Browse the repository at this point in the history
* Better failure message.

* chore: generate libraries at Mon Sep 30 15:12:53 UTC 2024

* Pretty

---------

Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
  • Loading branch information
tom-andersen and cloud-java-bot authored Nov 1, 2024
1 parent 593acc3 commit cb5f9d6
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import static com.google.cloud.firestore.LocalFirestoreHelper.UPDATED_FIELD_PROTO;
import static com.google.cloud.firestore.LocalFirestoreHelper.map;
import static com.google.cloud.firestore.LocalFirestoreHelper.string;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.*;

import com.google.api.gax.grpc.GrpcStatusCode;
Expand Down Expand Up @@ -169,10 +169,11 @@ public void before() {

@After
public void after() {
assertTrue(exceptions.isEmpty());
assertTrue(requests.isEmpty());
assertTrue(documentSnapshots.isEmpty());
assertTrue(querySnapshots.isEmpty());
Object[] emptyArray = new Object[0];
assertArrayEquals(exceptions.toArray(), emptyArray);
assertArrayEquals(requests.toArray(), emptyArray);
assertArrayEquals(documentSnapshots.toArray(), emptyArray);
assertArrayEquals(querySnapshots.toArray(), emptyArray);
listenerRegistration.remove();
}

Expand Down

0 comments on commit cb5f9d6

Please sign in to comment.