예제 #1
0
        public async Task RoomLogic_GetAllAsync_ShouldReturnRoomsByFacilityFilterd()
        {
            _roomFacilityRepository.Setup(s => s.GetByRoomIdsAsync(It.IsAny <IEnumerable <Guid> >())).ReturnsAsync(GetRoomFacility);
            _roomRepository.Setup(s => s.GetAllAsync()).ReturnsAsync(GetRooms);
            var filters = new List <Dictionary <string, string> >();

            filters.Add(new Dictionary <string, string>()
            {
                { "HasWifi", "1" }, { "HasLargeScreen", "1" }
            });
            var rooms = await roomLogic.GetAllAsync(25, filters);

            Assert.AreEqual(2, rooms.Count());
        }