public void Create_Itself_From_Serialized_Of_Reward_Costumer() { string serializedCriteria = "Reward: 13Sep2019(Fri),14Sep2019(Sat)"; HotelSearchCriteria hotelSearchCriteria = HotelSearchCriteria.CreateFromSerializedCriteria(serializedCriteria); Assert.AreEqual(CostumerType.Reward, hotelSearchCriteria.CostumerType); Assert.AreEqual(new DateTime(2019, 09, 13), hotelSearchCriteria.Dates.ElementAt(0)); Assert.AreEqual(new DateTime(2019, 09, 14), hotelSearchCriteria.Dates.ElementAt(1)); }
public string Do(string serializedCriteria) { IHotelSearchCriteria hotelSearchCriteria = HotelSearchCriteria.CreateFromSerializedCriteria(serializedCriteria); return(FindTheCheapestHotel.Do(hotelSearchCriteria)); }
public string FindTheCheapestHotel(string criteria) { return(HotelService.FindTheCheapestHotel(HotelSearchCriteria.CreateFromSerializedCriteria(criteria))); }