private HotelAppService getSut_For_GetCheaperHotel_ShouldReturnCheaperHotel_WithinAGivenClient(Hotel cheaperHotel) { IHotelRepository mockedRepository = this.getHotelMockedRepo_For_GetCheaperHotel_ShouldReturnCheaperHotel_WithinAGivenClient(cheaperHotel); HotelAppService hotelAppService = new HotelAppService(mockedRepository); return(hotelAppService); }
public void GetCheaperHotel_ShouldReturnCheaperHotel_WithinAGivenClient() { //Arrange Hotel cheaperHotel = getCheperHotel_For_GetCheaperHotel_ShouldReturnCheaperHotel_WithinAGivenClient(); HotelAppService sut = this.getSut_For_GetCheaperHotel_ShouldReturnCheaperHotel_WithinAGivenClient(cheaperHotel); Client client = getClient_For_GetCheaperHotel_ShouldReturnCheaperHotel_WithinAGivenClient(); DateTime[] dates = getDates_For_GetCheaperHotel_ShouldReturnCheaperHotel_WithinAGivenClient(); //Act Hotel resultHotel = sut.GetCheaperHotel(client, dates); Assert.True(resultHotel.Name == cheaperHotel.Name); }
public void Setup() { hotelService = new Mock <IHotelService>(); hotelAppService = new HotelAppService(hotelService.Object); }