public async System.Threading.Tasks.Task TestHotelprocessorGetHotelListAsync() { var Actualdata = ReadJsondata(); IHotelRepository _repository = new HotelRepository(_dbcontext); IHotelProcessor _processor = new HotelProcessor(_repository); var actualdata = _repository.GetAllHotel(); var response = await _processor.GetAllHotel(); Assert.AreEqual(response.Model.Count, actualdata.Count); }
public async System.Threading.Tasks.Task TestAlreadyExistingHotelProcessorAsync() { var Actualdata = ReadJsondata(); IHotelRepository _repository = new HotelRepository(_dbcontext); IHotelProcessor _processor = new HotelProcessor(_repository); var actualdata = _repository.GetAllHotel(); var response = await _processor.AddHotel(new Modules.Inventory.Model.Add.Hotel { Name = "Hotel ALBORADA OCEAN CLUB", Description = "test", Price = 5000, HotelImage = "test.jpg" }); Assert.AreEqual(response.Messages, "Hotel Already Exists"); }