Skip to content

chore: Removing redundant test dependency #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,6 @@
<version>0.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.cedarsoftware</groupId>
<artifactId>java-util</artifactId>
<version>1.26.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private Builder() {}
/**
* Sets the lightSettingsColor value with a string.
*
* @param lightSettingsColor LightSettingsColor specified in the {@code #rrggbb} format.
* @param color LightSettingsColor specified in the {@code #rrggbb} format.
* @return This builder.
*/
public Builder setColorFromString(String color) {
Expand All @@ -72,7 +72,7 @@ public Builder setColorFromString(String color) {
/**
* Sets the lightSettingsColor value in the light settings.
*
* @param lightSettingsColor Color to be used in the light settings.
* @param color Color to be used in the light settings.
* @return This builder.
*/
public Builder setColor(LightSettingsColor color) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/google/firebase/messaging/Notification.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ private Notification(Builder builder) {
}

/**
* Creates a new {@link Notification.Builder}.
* Creates a new {@link Builder}.
*
* @return A {@link Notification.Builder} instance.
* @return A {@link Builder} instance.
*/
public static Builder builder() {
return new Builder();
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/google/firebase/database/TestHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.firebase.database;

import static com.cedarsoftware.util.DeepEquals.deepEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

Expand All @@ -43,6 +42,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -241,7 +241,7 @@ public static void setHijackHash(DatabaseReference ref, boolean hijackHash) {
* a true and more effective super set.
*/
public static void assertDeepEquals(Object a, Object b) {
if (!deepEquals(a, b)) {
if (!Objects.deepEquals(a, b)) {
fail("Values different.\nExpected: " + a + "\nActual: " + b);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

import static org.junit.Assert.fail;

import com.cedarsoftware.util.DeepEquals;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.Semaphore;

public class ValueExpectationHelper {
Expand All @@ -39,7 +39,7 @@ public void add(final Query query, final Object expected) {
public void onDataChange(DataSnapshot snapshot) {
Object result = snapshot.getValue();
// Hack to handle race condition in initial data
if (DeepEquals.deepEquals(expected, result)) {
if (Objects.deepEquals(expected, result)) {
// We may pass through intermediate states, but we should end up with
// the correct
// state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public void successorKeyIsCorrect() {
lastKey = entry.getKey();
}
if (lastKey != null) {
assertEquals(null, map.getSuccessorKey(lastKey));
assertNull(map.getSuccessorKey(lastKey));
}
}
}
Expand Down Expand Up @@ -295,13 +295,13 @@ public int compare(Integer o1, Integer o2) {
arraycopy = arraycopy.insert(key, value);
copyWithDifferentComparator = copyWithDifferentComparator.insert(key, value);
}
Assert.assertTrue(map.equals(copy));
Assert.assertTrue(map.equals(arraycopy));
Assert.assertTrue(arraycopy.equals(map));

Assert.assertFalse(map.equals(copyWithDifferentComparator));
Assert.assertFalse(map.equals(copy.remove(copy.getMaxKey())));
Assert.assertFalse(map.equals(copy.insert(copy.getMaxKey() + 1, 1)));
Assert.assertFalse(map.equals(arraycopy.remove(arraycopy.getMaxKey())));
Assert.assertEquals(map, copy);
Assert.assertEquals(map, arraycopy);
Assert.assertEquals(arraycopy, map);

Assert.assertNotEquals(map, copyWithDifferentComparator);
Assert.assertNotEquals(map, copy.remove(copy.getMaxKey()));
Assert.assertNotEquals(map, copy.insert(copy.getMaxKey() + 1, 1));
Assert.assertNotEquals(map, arraycopy.remove(arraycopy.getMaxKey()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import com.cedarsoftware.util.DeepEquals;
import com.google.auth.oauth2.AccessToken;
import com.google.auth.oauth2.OAuth2Credentials;
import com.google.common.collect.ImmutableMap;
Expand All @@ -38,6 +37,7 @@
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -235,7 +235,7 @@ private void assertToken(String token, String expectedToken, Map<String, Object>
assertEquals(expectedToken, map.get("token"));

Map auth = (Map) map.get("auth");
DeepEquals.deepEquals(expectedAuth, auth);
assertTrue(Objects.deepEquals(expectedAuth, auth));
}

private static class TestGetTokenListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import com.cedarsoftware.util.DeepEquals;
import com.google.common.collect.ImmutableList;
import com.google.firebase.FirebaseApp;
import com.google.firebase.database.ChildEventListener;
Expand Down Expand Up @@ -56,6 +55,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Random;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Semaphore;
Expand Down Expand Up @@ -1645,7 +1645,7 @@ public void testUpdateAfterSetLeafNodeWorks() throws InterruptedException {
ref.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot snapshot) {
if (DeepEquals.deepEquals(snapshot.getValue(), expected)) {
if (Objects.deepEquals(snapshot.getValue(), expected)) {
semaphore.release();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public static synchronized FirebaseApp ensureDefaultApp() {
.setStorageBucket(getStorageBucket())
.setCredentials(TestUtils.getCertCredential(getServiceAccountCertificate()))
.setFirestoreOptions(FirestoreOptions.newBuilder()
.setTimestampsInSnapshotsEnabled(true)
.setCredentials(TestUtils.getCertCredential(getServiceAccountCertificate()))
.build())
.build();
Expand Down