コード例 #1
0
        public async Task WasteReceivedDateCanBeInThePast()
        {
            movement = new TestableMovement
            {
                Id             = MovementId,
                Date           = PastDate,
                NotificationId = NotificationId,
                Status         = MovementStatus.Captured
            };

            A.CallTo(() => movementRepository.GetById(MovementId)).Returns(movement);

            var result = await partialRejectionFactory.PartailReject(movement.Id, PastDate, rejectionreason, 1, ShipmentQuantityUnits.Tonnes, 10, ShipmentQuantityUnits.Tonnes, PastDate);

            Assert.Equal(PastDate, result.WasteReceivedDate);
        }
コード例 #2
0
        public async Task <bool> HandleAsync(RecordPartialRejectionInternal message)
        {
            await partialRejectionMovement.PartailReject(message.MovementId,
                                                         message.WasteReceivedDate,
                                                         message.Reason,
                                                         message.ActualQuantity,
                                                         message.ActualUnits,
                                                         message.RejectedQuantity,
                                                         message.RejectedUnits,
                                                         message.WasteDisposedDate);

            await context.SaveChangesAsync();

            return(true);
        }