use of org.baeldung.spring.data.couchbase.model.Campus in project tutorials by eugenp.
the class CampusServiceImplIntegrationTest method whenFindByLocationNearNewYorkCity_thenResultContainsColumbia.
@Test
public final void whenFindByLocationNearNewYorkCity_thenResultContainsColumbia() throws Exception {
Set<Campus> campuses = campusService.findByLocationNear(NewYorkCity, new Distance(1, Metrics.NEUTRAL));
assertFalse(campuses.isEmpty());
assertTrue(campuses.contains(Columbia));
assertFalse(campuses.contains(Harvard));
}
use of org.baeldung.spring.data.couchbase.model.Campus in project tutorials by eugenp.
the class CampusServiceImplIntegrationTest method whenFindByLocationNearBoston_thenResultContainsHarvard.
@Test
public final void whenFindByLocationNearBoston_thenResultContainsHarvard() throws Exception {
Set<Campus> campuses = campusService.findByLocationNear(Boston, new Distance(1, Metrics.NEUTRAL));
assertFalse(campuses.isEmpty());
assertTrue(campuses.contains(Harvard));
assertFalse(campuses.contains(Columbia));
}
use of org.baeldung.spring.data.couchbase.model.Campus in project tutorials by eugenp.
the class CampusServiceImplIntegrationTest method givenHarvardId_whenFind_thenReturnsHarvard.
@Test
public final void givenHarvardId_whenFind_thenReturnsHarvard() throws Exception {
Campus actual = campusService.find(Harvard.getId());
assertNotNull(actual);
assertEquals(Harvard, actual);
}
Aggregations