Remove dependency with joda time to simplify the project dependencies

This commit is contained in:
Dapeng 2016-09-19 15:03:53 +08:00 committed by Antoine Rey
parent 4d90e7e394
commit a9b6565fcf
6 changed files with 35 additions and 61 deletions

View file

@ -1,6 +1,5 @@
package org.springframework.samples.petclinic.service;
import org.joda.time.LocalDate;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@ -13,6 +12,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collection;
import java.util.Date;
import static org.assertj.core.api.Assertions.assertThat;
@ -123,7 +123,7 @@ public class ClinicServiceSpringDataJpaTests {
pet.setName("bowser");
Collection<PetType> types = this.clinicService.findPetTypes();
pet.setType(EntityUtils.getById(types, PetType.class, 2));
pet.setBirthDate(new LocalDate());
pet.setBirthDate(new Date());
owner6.addPet(pet);
assertThat(owner6.getPets().size()).isEqualTo(found + 1);