Skip to content

Commit 5dd03b4

Browse files
authored
chore: Removing redundant test dependency (#441)
1 parent dcb07a1 commit 5dd03b4

File tree

9 files changed

+21
-28
lines changed

9 files changed

+21
-28
lines changed

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,12 +465,6 @@
465465
<version>0.6</version>
466466
<scope>test</scope>
467467
</dependency>
468-
<dependency>
469-
<groupId>com.cedarsoftware</groupId>
470-
<artifactId>java-util</artifactId>
471-
<version>1.26.0</version>
472-
<scope>test</scope>
473-
</dependency>
474468
<dependency>
475469
<groupId>junit</groupId>
476470
<artifactId>junit</artifactId>

src/main/java/com/google/firebase/messaging/LightSettings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private Builder() {}
6161
/**
6262
* Sets the lightSettingsColor value with a string.
6363
*
64-
* @param lightSettingsColor LightSettingsColor specified in the {@code #rrggbb} format.
64+
* @param color LightSettingsColor specified in the {@code #rrggbb} format.
6565
* @return This builder.
6666
*/
6767
public Builder setColorFromString(String color) {
@@ -72,7 +72,7 @@ public Builder setColorFromString(String color) {
7272
/**
7373
* Sets the lightSettingsColor value in the light settings.
7474
*
75-
* @param lightSettingsColor Color to be used in the light settings.
75+
* @param color Color to be used in the light settings.
7676
* @return This builder.
7777
*/
7878
public Builder setColor(LightSettingsColor color) {

src/main/java/com/google/firebase/messaging/Notification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ private Notification(Builder builder) {
4040
}
4141

4242
/**
43-
* Creates a new {@link Notification.Builder}.
43+
* Creates a new {@link Builder}.
4444
*
45-
* @return A {@link Notification.Builder} instance.
45+
* @return A {@link Builder} instance.
4646
*/
4747
public static Builder builder() {
4848
return new Builder();

src/test/java/com/google/firebase/database/TestHelpers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.firebase.database;
1818

19-
import static com.cedarsoftware.util.DeepEquals.deepEquals;
2019
import static org.junit.Assert.assertTrue;
2120
import static org.junit.Assert.fail;
2221

@@ -43,6 +42,7 @@
4342
import java.util.Iterator;
4443
import java.util.List;
4544
import java.util.Map;
45+
import java.util.Objects;
4646
import java.util.Set;
4747
import java.util.UUID;
4848
import java.util.concurrent.Executors;
@@ -241,7 +241,7 @@ public static void setHijackHash(DatabaseReference ref, boolean hijackHash) {
241241
* a true and more effective super set.
242242
*/
243243
public static void assertDeepEquals(Object a, Object b) {
244-
if (!deepEquals(a, b)) {
244+
if (!Objects.deepEquals(a, b)) {
245245
fail("Values different.\nExpected: " + a + "\nActual: " + b);
246246
}
247247
}

src/test/java/com/google/firebase/database/ValueExpectationHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
import static org.junit.Assert.fail;
2020

21-
import com.cedarsoftware.util.DeepEquals;
2221
import java.util.ArrayList;
2322
import java.util.Iterator;
2423
import java.util.List;
24+
import java.util.Objects;
2525
import java.util.concurrent.Semaphore;
2626

2727
public class ValueExpectationHelper {
@@ -39,7 +39,7 @@ public void add(final Query query, final Object expected) {
3939
public void onDataChange(DataSnapshot snapshot) {
4040
Object result = snapshot.getValue();
4141
// Hack to handle race condition in initial data
42-
if (DeepEquals.deepEquals(expected, result)) {
42+
if (Objects.deepEquals(expected, result)) {
4343
// We may pass through intermediate states, but we should end up with
4444
// the correct
4545
// state

src/test/java/com/google/firebase/database/collection/RBTreeSortedMapTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void successorKeyIsCorrect() {
262262
lastKey = entry.getKey();
263263
}
264264
if (lastKey != null) {
265-
assertEquals(null, map.getSuccessorKey(lastKey));
265+
assertNull(map.getSuccessorKey(lastKey));
266266
}
267267
}
268268
}
@@ -295,13 +295,13 @@ public int compare(Integer o1, Integer o2) {
295295
arraycopy = arraycopy.insert(key, value);
296296
copyWithDifferentComparator = copyWithDifferentComparator.insert(key, value);
297297
}
298-
Assert.assertTrue(map.equals(copy));
299-
Assert.assertTrue(map.equals(arraycopy));
300-
Assert.assertTrue(arraycopy.equals(map));
301-
302-
Assert.assertFalse(map.equals(copyWithDifferentComparator));
303-
Assert.assertFalse(map.equals(copy.remove(copy.getMaxKey())));
304-
Assert.assertFalse(map.equals(copy.insert(copy.getMaxKey() + 1, 1)));
305-
Assert.assertFalse(map.equals(arraycopy.remove(arraycopy.getMaxKey())));
298+
Assert.assertEquals(map, copy);
299+
Assert.assertEquals(map, arraycopy);
300+
Assert.assertEquals(arraycopy, map);
301+
302+
Assert.assertNotEquals(map, copyWithDifferentComparator);
303+
Assert.assertNotEquals(map, copy.remove(copy.getMaxKey()));
304+
Assert.assertNotEquals(map, copy.insert(copy.getMaxKey() + 1, 1));
305+
Assert.assertNotEquals(map, arraycopy.remove(arraycopy.getMaxKey()));
306306
}
307307
}

src/test/java/com/google/firebase/database/core/JvmAuthTokenProviderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static org.junit.Assert.assertTrue;
2121
import static org.junit.Assert.fail;
2222

23-
import com.cedarsoftware.util.DeepEquals;
2423
import com.google.auth.oauth2.AccessToken;
2524
import com.google.auth.oauth2.OAuth2Credentials;
2625
import com.google.common.collect.ImmutableMap;
@@ -38,6 +37,7 @@
3837
import java.util.Date;
3938
import java.util.List;
4039
import java.util.Map;
40+
import java.util.Objects;
4141
import java.util.concurrent.Executor;
4242
import java.util.concurrent.ExecutorService;
4343
import java.util.concurrent.Executors;
@@ -235,7 +235,7 @@ private void assertToken(String token, String expectedToken, Map<String, Object>
235235
assertEquals(expectedToken, map.get("token"));
236236

237237
Map auth = (Map) map.get("auth");
238-
DeepEquals.deepEquals(expectedAuth, auth);
238+
assertTrue(Objects.deepEquals(expectedAuth, auth));
239239
}
240240

241241
private static class TestGetTokenListener

src/test/java/com/google/firebase/database/integration/DataTestIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import static org.junit.Assert.assertTrue;
2525
import static org.junit.Assert.fail;
2626

27-
import com.cedarsoftware.util.DeepEquals;
2827
import com.google.common.collect.ImmutableList;
2928
import com.google.firebase.FirebaseApp;
3029
import com.google.firebase.database.ChildEventListener;
@@ -56,6 +55,7 @@
5655
import java.util.HashMap;
5756
import java.util.List;
5857
import java.util.Map;
58+
import java.util.Objects;
5959
import java.util.Random;
6060
import java.util.concurrent.ExecutionException;
6161
import java.util.concurrent.Semaphore;
@@ -1645,7 +1645,7 @@ public void testUpdateAfterSetLeafNodeWorks() throws InterruptedException {
16451645
ref.addValueEventListener(new ValueEventListener() {
16461646
@Override
16471647
public void onDataChange(DataSnapshot snapshot) {
1648-
if (DeepEquals.deepEquals(snapshot.getValue(), expected)) {
1648+
if (Objects.deepEquals(snapshot.getValue(), expected)) {
16491649
semaphore.release();
16501650
}
16511651
}

src/test/java/com/google/firebase/testing/IntegrationTestUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ public static synchronized FirebaseApp ensureDefaultApp() {
110110
.setStorageBucket(getStorageBucket())
111111
.setCredentials(TestUtils.getCertCredential(getServiceAccountCertificate()))
112112
.setFirestoreOptions(FirestoreOptions.newBuilder()
113-
.setTimestampsInSnapshotsEnabled(true)
114113
.setCredentials(TestUtils.getCertCredential(getServiceAccountCertificate()))
115114
.build())
116115
.build();

0 commit comments

Comments
 (0)