From 831ee5001ef72be713fcfd07f5264b688c255f5f Mon Sep 17 00:00:00 2001 From: Kevin Ruiz Date: Sat, 10 Aug 2024 18:24:53 +0200 Subject: [PATCH] test: find hotel --- .../InMemoryHotelRepositoryShould.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CorporateHotel.Tests/HotelManagement/Infrastructure/InMemoryHotelRepositoryShould.cs b/CorporateHotel.Tests/HotelManagement/Infrastructure/InMemoryHotelRepositoryShould.cs index fdd611f..26a703d 100644 --- a/CorporateHotel.Tests/HotelManagement/Infrastructure/InMemoryHotelRepositoryShould.cs +++ b/CorporateHotel.Tests/HotelManagement/Infrastructure/InMemoryHotelRepositoryShould.cs @@ -26,4 +26,18 @@ public void AddNewHotel() //Assert Assert.Contains(newHotel, hotels); } + + [Fact] + public void FindHotel() + { + var currentHotelId = "39379273-be6a-4d3f-90c9-7c77de3c5de1"; + var hotelId = new HotelId(currentHotelId); + var currentHotelName = "Current hotel"; + var currentHotel = new Hotel(hotelId, currentHotelName); + var inMemoryHotelRepository = new InMemoryHotelRepository(new List(){currentHotel}); + + var foundHotel = inMemoryHotelRepository.FindHotelBy(hotelId); + + Assert.Equal(currentHotel, foundHotel); + } } \ No newline at end of file