mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-14 05:41:12 +00:00
Use Java 8 LocalDate instead of java.util.Date
See gh-328
This commit is contained in:
parent
38bd3280cb
commit
c0748e3e82
5 changed files with 17 additions and 23 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue