|
31 | 31 | import org.bson.Document; |
32 | 32 | import org.junit.jupiter.api.BeforeAll; |
33 | 33 | import org.junit.jupiter.api.BeforeEach; |
34 | | -import org.junit.jupiter.api.Disabled; |
35 | 34 | import org.junit.jupiter.api.Test; |
36 | 35 | import org.junit.jupiter.api.extension.ExtendWith; |
37 | 36 | import org.springframework.beans.factory.annotation.Autowired; |
|
50 | 49 | import org.springframework.data.geo.Box; |
51 | 50 | import org.springframework.data.geo.Circle; |
52 | 51 | import org.springframework.data.geo.Distance; |
53 | | -import org.springframework.data.geo.GeoPage; |
54 | 52 | import org.springframework.data.geo.GeoResult; |
55 | 53 | import org.springframework.data.geo.GeoResults; |
56 | 54 | import org.springframework.data.geo.Metrics; |
@@ -695,18 +693,21 @@ void testNearWithRange() { |
695 | 693 | } |
696 | 694 |
|
697 | 695 | @Test |
698 | | - @Disabled("too complicated") |
699 | 696 | void testNearReturningGeoPage() { |
700 | 697 |
|
701 | | - // TODO: still need to create the count and extract the total elements |
702 | | - GeoPage<User> page1 = fragment.findByLocationCoordinatesNear(new Point(-73.99, 40.73), |
703 | | - Distance.of(2000, Metrics.KILOMETERS), PageRequest.of(0, 1)); |
704 | | - |
705 | | - assertThat(page1.hasNext()).isTrue(); |
| 698 | + assertThatExceptionOfType(NoSuchMethodException.class) |
| 699 | + .isThrownBy(() -> fragment.findByLocationCoordinatesNear(new Point(-73.99, 40.73), |
| 700 | + Distance.of(2000, Metrics.KILOMETERS), PageRequest.of(0, 1))); |
706 | 701 |
|
707 | | - GeoPage<User> page2 = fragment.findByLocationCoordinatesNear(new Point(-73.99, 40.73), |
708 | | - Distance.of(2000, Metrics.KILOMETERS), page1.nextPageable()); |
709 | | - assertThat(page2.hasNext()).isFalse(); |
| 702 | + // TODO: still need to create the count and extract the total elements |
| 703 | + // GeoPage<User> page1 = fragment.findByLocationCoordinatesNear(new Point(-73.99, 40.73), |
| 704 | + // Distance.of(2000, Metrics.KILOMETERS), PageRequest.of(0, 1)); |
| 705 | + // |
| 706 | + // assertThat(page1.hasNext()).isTrue(); |
| 707 | + // |
| 708 | + // GeoPage<User> page2 = fragment.findByLocationCoordinatesNear(new Point(-73.99, 40.73), |
| 709 | + // Distance.of(2000, Metrics.KILOMETERS), page1.nextPageable()); |
| 710 | + // assertThat(page2.hasNext()).isFalse(); |
710 | 711 | } |
711 | 712 |
|
712 | 713 | /** |
|
0 commit comments