private void SendNotification(ReliefRequisition requisition)
        {
            try
            {
                string destinationURl;
                if (Request.Url.Host != null)
                {
                    if (Request.Url.Host == "localhost")
                    {
                        destinationURl = "http://" + Request.Url.Authority +
                                         "/Logistics/DispatchAllocation/IndexFromNotification?paramRegionId=" +
                                         requisition.RegionID +
                                         "&recordId=" + requisition.RequisitionID;
                        return;
                    }
                    destinationURl = "http://" + Request.Url.Authority +
                                     Request.ApplicationPath +
                                     "/Logistics/DispatchAllocation/IndexFromNotification?paramRegionId=" +
                                     requisition.RegionID +
                                     "&recordId=" + requisition.RequisitionID;

                    _notificationService.AddNotificationForLogistcisFromEarlyWaring(destinationURl,
                                                                                    requisition.RequisitionID,
                                                                                    (int)requisition.RegionID,
                                                                                    requisition.RequisitionNo);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void CanNotificationBeSaved()
        {
            var notification = new Notification()
            {
                Text               = "transport order two",
                Url                = _destinationURl,
                RecordId           = 2,
                IsRead             = false,
                TypeOfNotification = "New transport order",
                CreatedDate        = DateTime.Now,
                Id          = 1,
                Application = "Hub Managers"
            };

            var tranportRequsition = new TransportRequisition()
            {
                CertifiedBy            = 1,
                CertifiedDate          = DateTime.Today,
                RequestedBy            = 1,
                RequestedDate          = DateTime.Today,
                TransportRequisitionID = 1,
                TransportRequisitionNo = "TRN-001",
                Status = 1,
                Remark = "Remark",
            };
            var hubId = new List <int>()
            {
                1, 2, 3
            };
            var resultLogistics   = _notificationService.AddNotificationForLogistcisFromEarlyWaring("", 1, 1, "reg-001");
            var resultProcurement = _notificationService.AddNotificationForProcurementFromLogistics("", tranportRequsition);
            var resultHubManager  = _notificationService.AddNotificationForHubManagersFromTransportOrder("", 1, "trans-001", hubId);


            Assert.IsTrue(resultLogistics);
            Assert.IsTrue(resultProcurement);
            Assert.IsTrue(resultHubManager);
        }