From 3f9c34fb51a4755088237dc4a970537fea7a53f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Gonz=C3=A1lez=20Liarte?= Date: Thu, 16 May 2024 21:33:16 +0200 Subject: [PATCH] remove setId for ShelterCertificate --- EntitiesModel.puml | 2 +- .../cat/udl/eps/softarch/demo/domain/ShelterCertificate.java | 1 - .../softarch/demo/steps/RegisterShelterCertificateStepDefs.java | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/EntitiesModel.puml b/EntitiesModel.puml index 1f2503a..bb8c6d0 100644 --- a/EntitiesModel.puml +++ b/EntitiesModel.puml @@ -51,7 +51,7 @@ class Location { postalCode: Integer } -class ShelterCertificate { +class ShelterCertificate extends UriEntity { id: Long expirationDate: DateTime } diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/ShelterCertificate.java b/src/main/java/cat/udl/eps/softarch/demo/domain/ShelterCertificate.java index 2c0c796..8f3d6ec 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/ShelterCertificate.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/ShelterCertificate.java @@ -21,5 +21,4 @@ public class ShelterCertificate extends UriEntity { private Long id; private LocalDateTime expirationDate; - } diff --git a/src/test/java/cat/udl/eps/softarch/demo/steps/RegisterShelterCertificateStepDefs.java b/src/test/java/cat/udl/eps/softarch/demo/steps/RegisterShelterCertificateStepDefs.java index 8b30cbb..0e1585f 100644 --- a/src/test/java/cat/udl/eps/softarch/demo/steps/RegisterShelterCertificateStepDefs.java +++ b/src/test/java/cat/udl/eps/softarch/demo/steps/RegisterShelterCertificateStepDefs.java @@ -33,7 +33,6 @@ public class RegisterShelterCertificateStepDefs { @When("I register a new shelter certificate with id \"([^\"]*)\" for shelter with name \"([^\"]*)\"$") public void iRegisterANewShelterCertificateWithIdForShelterWithName(Long id, String shelterName) throws Exception { ShelterCertificate shelterCertificate = new ShelterCertificate(); - shelterCertificate.setId(id); Shelter shelter = shelterRepository.findByName(shelterName); shelterCertificate.setShelter(shelter); @@ -67,7 +66,6 @@ public void itHasNotBeenCreatedAShelterCertificateWithId(Long id) { @Given("^There is a registered shelter certificate with id \"([^\"]*)\" for shelter with name \"([^\"]*)\"$") public void thereIsARegisteredShelterCertificateWithIdForShelterWithName(Long id, String shelterName) { ShelterCertificate shelterCertificate = new ShelterCertificate(); - shelterCertificate.setId(id); Shelter shelter = shelterRepository.findByName(shelterName); shelterCertificate.setShelter(shelter);