diff --git a/src/main/java/cat/udl/eps/softarch/demo/repository/AdoptionRepository.java b/src/main/java/cat/udl/eps/softarch/demo/repository/AdoptionRepository.java new file mode 100644 index 00000000..1604313a --- /dev/null +++ b/src/main/java/cat/udl/eps/softarch/demo/repository/AdoptionRepository.java @@ -0,0 +1,9 @@ +package cat.udl.eps.softarch.demo.repository; + +import cat.udl.eps.softarch.demo.domain.Adoption; +import cat.udl.eps.softarch.demo.domain.Location; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; + +public interface AdoptionRepository extends CrudRepository, PagingAndSortingRepository { +} diff --git a/src/test/java/cat/udl/eps/softarch/demo/steps/ProcessAdoptionStepDefs.java b/src/test/java/cat/udl/eps/softarch/demo/steps/ProcessAdoptionStepDefs.java index ab5260b9..c05f6c60 100644 --- a/src/test/java/cat/udl/eps/softarch/demo/steps/ProcessAdoptionStepDefs.java +++ b/src/test/java/cat/udl/eps/softarch/demo/steps/ProcessAdoptionStepDefs.java @@ -36,6 +36,8 @@ public class ProcessAdoptionStepDefs { @Autowired PetRepository petRepository; + Adopt + protected ResultActions result; @@ -102,6 +104,11 @@ public void thereIsAPetWithNameAndItIsAlreadyAdopted(String arg0) { pet.setBreed("breed"); petRepository.save(pet); + Adoption adoption = new Adoption(); + adoption.setPet(petRepository.findAll().iterator().next()); + adoptionR + + }