private void AddToNotification(TransportRequisition transportRequisition)
        {
            if (HttpContext.Current == null)
            {
                return;
            }
            string destinationURl;

            if (HttpContext.Current.Request.Url.Host == "localhost")
            {
                destinationURl = "http://" + HttpContext.Current.Request.Url.Authority +
                                 "/Procurement/TransportOrder/NotificationNewRequisitions?recordId=" + transportRequisition.TransportRequisitionID;
                return;
            }
            destinationURl = "http://" + HttpContext.Current.Request.Url.Authority +
                             HttpContext.Current.Request.ApplicationPath +
                             "/Procurement/TransportOrder/NotificationNewRequisitions?recordId=" + transportRequisition.TransportRequisitionID;
            _notificationService.AddNotificationForProcurementFromLogistics(destinationURl, transportRequisition);
        }
        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);
        }