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."); }
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()); }
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."); }
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()); }
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."); }
public int GetTotalByAndSearch(RoomStateSearch searchItem) { return(_unitOfWork.RoomStates.GetTotalAnd(searchItem)); }
public ICollection <RoomState> GetByAndSearch(RoomStateSearch searchItem, Pagination pagination, OrderBy <RoomState> orderBy) { return(_unitOfWork.RoomStates.GetIncludedRoomByAndSearch(searchItem, pagination, orderBy)); }