Browse Source

DATAMONGO-2217 - Fix zonded DateTime usage in test.

Original Pull Request: #654
pull/658/head
Minsu 7 years ago committed by Christoph Strobl
parent
commit
9d307bd115
  1. 4
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/AggregationTests.java

4
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/AggregationTests.java

@ -90,6 +90,7 @@ import com.mongodb.client.MongoCollection; @@ -90,6 +90,7 @@ import com.mongodb.client.MongoCollection;
* @author Nikolay Bogdanov
* @author Maninder Singh
* @author Sergey Shcherbakov
* @author Minsu Kim
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:infrastructure.xml")
@ -1418,10 +1419,11 @@ public class AggregationTests { @@ -1418,10 +1419,11 @@ public class AggregationTests {
mongoTemplate.dropCollection(ObjectWithDate.class);
DateTime dateTime = new DateTime() //
.withZone(DateTimeZone.UTC) //
.withYear(2014) //
.withMonthOfYear(2) //
.withDayOfMonth(7) //
.withTime(3, 4, 5, 6).toDateTime(DateTimeZone.UTC).toDateTimeISO();
.withTime(3, 4, 5, 6).toDateTimeISO();
ObjectWithDate owd = new ObjectWithDate(dateTime.toDate());
mongoTemplate.insert(owd);

Loading…
Cancel
Save