DATAMONGO-2050 - Polishing.
Move to AssertJ. Original pull request: #596.
This commit is contained in:
committed by
Mark Paluch
parent
7a34cc73d8
commit
38ccdc5dfc
@@ -15,8 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.mongodb.core.aggregation;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.junit.Test;
|
||||
@@ -42,7 +41,7 @@ public class GeoNearOperationUnitTests {
|
||||
Document nearClause = DocumentTestUtils.getAsDocument(document, "$geoNear");
|
||||
|
||||
Document expected = new Document(query.toDocument()).append("distanceField", "distance");
|
||||
assertThat(nearClause, is(expected));
|
||||
assertThat(nearClause).isEqualTo(expected);
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-2050
|
||||
@@ -52,9 +51,6 @@ public class GeoNearOperationUnitTests {
|
||||
GeoNearOperation operation = new GeoNearOperation(query, "distance").useIndex("geo-index-1");
|
||||
Document document = operation.toDocument(Aggregation.DEFAULT_CONTEXT);
|
||||
|
||||
Document nearClause = DocumentTestUtils.getAsDocument(document, "$geoNear");
|
||||
|
||||
Document expected = new Document(query.toDocument()).append("distanceField", "distance").append("key", "geo-index-1");
|
||||
assertThat(nearClause, is(expected));
|
||||
assertThat(DocumentTestUtils.getAsDocument(document, "$geoNear")).containsEntry("key", "geo-index-1");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user