Skip to content

Commit

Permalink
test: find hotel
Browse files Browse the repository at this point in the history
  • Loading branch information
kleov-rf committed Aug 10, 2024
1 parent e19c021 commit 831ee50
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Hotel>(){currentHotel});

var foundHotel = inMemoryHotelRepository.FindHotelBy(hotelId);

Assert.Equal(currentHotel, foundHotel);
}
}

0 comments on commit 831ee50

Please sign in to comment.