Merge branch 'master' into JAVA-13136

This commit is contained in:
freelansam
2022-07-15 10:01:48 +05:30
committed by GitHub
366 changed files with 1405 additions and 541 deletions

View File

@@ -0,0 +1,3 @@
### Relevant Articles:
- [Using Dates in CRUD Operations in MongoDB](https://www.baeldung.com/mongodb-java-date-operations)

View File

@@ -31,6 +31,11 @@ public class CrudClientLiveTest {
@Order(2)
public void whenReadingEventsByDate_thenCheckForReturnedDocument() {
Assertions.assertNotNull(CrudClient.readEventsByDate(CrudClient.dateQuery));
Event event = CrudClient.readEventsByDate(CrudClient.dateQuery);
Assertions.assertNotNull(event);
Assertions.assertEquals("Soccer game", event.title);
Assertions.assertEquals("Bar Avenue", event.location);
Assertions.assertEquals(CrudClient.soccerGame.dateTime, event.dateTime);
}
@Test
@@ -39,6 +44,9 @@ public class CrudClientLiveTest {
List<Event> events = CrudClient.readEventsByDateRange(CrudClient.from, CrudClient.to);
Assertions.assertNotNull(events);
Assertions.assertEquals(1, events.size());
Assertions.assertEquals("Soccer game", events.get(0).title);
Assertions.assertEquals("Bar Avenue", events.get(0).location);
Assertions.assertEquals(CrudClient.soccerGame.dateTime, events.get(0).dateTime);
}
@Test