Exemplo n.º 1
0
        public void RoomService_GetTotalByAndSearch_Full()
        {
            // Arrange
            IRoomStateService roomStateService = _kernel.Get <IRoomStateService>();
            RoomStateSearch   searchItem       = new RoomStateSearch();

            // Act
            int total = roomStateService.GetTotalByAndSearch(searchItem);

            // Assert
            Assert.IsTrue(total > 0, "Please generate room state from index page.");
        }
Exemplo n.º 2
0
        public void RoomStateRepo_GetIncludedRoomByAndSearch_Empty()
        {
            // Arrange
            var             unitOfWork = _kernel.Get <IUnitOfWork>();
            RoomStateSearch searchItem = new RoomStateSearch();
            Pagination      pagination = new Pagination {
                DisplaySize = 0, DisplayStart = 0
            };
            OrderBy <RoomState> orderBy = new OrderBy <RoomState>();

            // Act
            ICollection <RoomState> roomStates = unitOfWork.RoomStates.GetIncludedRoomByAndSearch(searchItem, pagination, orderBy);

            // Assert
            Assert.IsFalse(roomStates.Any());
        }
Exemplo n.º 3
0
        public void RoomStateRepo_GetIncludedRoomByAndSearch_Full()
        {
            // Arrange
            var             unitOfWork = _kernel.Get <IUnitOfWork>();
            RoomStateSearch searchItem = new RoomStateSearch();
            Pagination      pagination = new Pagination {
                DisplaySize = int.MaxValue, DisplayStart = 0
            };
            OrderBy <RoomState> orderBy = new OrderBy <RoomState>();

            // Act
            ICollection <RoomState> roomStates = unitOfWork.RoomStates.GetIncludedRoomByAndSearch(searchItem, pagination, orderBy);

            // Assert
            Assert.IsTrue(roomStates.Any(), "Please generate room state from index page.");
        }
Exemplo n.º 4
0
        public void RoomService_GetByAndSearch_Empty()
        {
            // Arrange
            IRoomStateService roomStateService = _kernel.Get <IRoomStateService>();
            RoomStateSearch   searchItem       = new RoomStateSearch();
            Pagination        pagination       = new Pagination {
                DisplaySize = 0, DisplayStart = 0
            };
            OrderBy <RoomState> orderBy = new OrderBy <RoomState>();

            // Act
            ICollection <RoomState> roomStates = roomStateService.GetByAndSearch(searchItem, pagination, orderBy);

            // Assert
            Assert.IsFalse(roomStates.Any());
        }
Exemplo n.º 5
0
        public void RoomService_GetByAndSearch_Full()
        {
            // Arrange
            IRoomStateService roomStateService = _kernel.Get <IRoomStateService>();
            RoomStateSearch   searchItem       = new RoomStateSearch();
            Pagination        pagination       = new Pagination {
                DisplaySize = int.MaxValue, DisplayStart = 0
            };
            OrderBy <RoomState> orderBy = new OrderBy <RoomState>();

            // Act
            ICollection <RoomState> roomStates = roomStateService.GetByAndSearch(searchItem, pagination, orderBy);

            // Assert
            Assert.IsTrue(roomStates.Any(), "Please generate room state from index page.");
        }
Exemplo n.º 6
0
 public int GetTotalByAndSearch(RoomStateSearch searchItem)
 {
     return(_unitOfWork.RoomStates.GetTotalAnd(searchItem));
 }
Exemplo n.º 7
0
 public ICollection <RoomState> GetByAndSearch(RoomStateSearch searchItem, Pagination pagination, OrderBy <RoomState> orderBy)
 {
     return(_unitOfWork.RoomStates.GetIncludedRoomByAndSearch(searchItem, pagination, orderBy));
 }