예제 #1
0
        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);
        }