Use Java 8 LocalDate instead of java.util.Date

See gh-328
This commit is contained in:
Antoine Rey 2018-06-27 18:34:37 +02:00 committed by Stephane Nicoll
parent 38bd3280cb
commit c0748e3e82
5 changed files with 17 additions and 23 deletions

View file

@ -2,8 +2,8 @@ package org.springframework.samples.petclinic.service;
import static org.assertj.core.api.Assertions.assertThat;
import java.time.LocalDate;
import java.util.Collection;
import java.util.Date;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -140,7 +140,7 @@ public class ClinicServiceTests {
pet.setName("bowser");
Collection<PetType> types = this.pets.findPetTypes();
pet.setType(EntityUtils.getById(types, PetType.class, 2));
pet.setBirthDate(new Date());
pet.setBirthDate(LocalDate.now());
owner6.addPet(pet);
assertThat(owner6.getPets().size()).isEqualTo(found + 1);