Example #1
0
        public void SetsNotificationProperties()
        {
            notification.NotificationNumber             = "GB 001 00250";
            notification.HasSpecialHandlingRequirements = true;
            notification.PhysicalCharacteristics        = new[]
            {
                PhysicalCharacteristicsInfo.CreatePhysicalCharacteristicsInfo(PhysicalCharacteristicType.Sludgy)
            };

            movement.NotificationId = notification.Id;
            movementDetails         = null;
            var result = GenerateViewModel();

            new ExpectedMovementViewModel
            {
                ActualCubicMetres    = string.Empty,
                ActualDate           = string.Empty,
                ActualKilograms      = string.Empty,
                ActualLitres         = string.Empty,
                ActualTonnes         = string.Empty,
                IsNotSpecialHandling = false,
                IsSpecialHandling    = true,
                NotificationNumber   = notification.NotificationNumber,
                Number = "0",
                PhysicalCharacteristics = "4",
                CA = "GB01 - EA"
            }.Evaluate(result);
        }
        public void SetsNotificationProperties()
        {
            notification.NotificationNumber = "GB 001 00250";
            notification.HasSpecialHandlingRequirements = true;
            notification.PhysicalCharacteristics = new[]
            {
                PhysicalCharacteristicsInfo.CreatePhysicalCharacteristicsInfo(PhysicalCharacteristicType.Sludgy)
            };
            movement.NotificationId = notification.Id;
            movementDetails = null;
            var result = GenerateViewModel();

            new ExpectedMovementViewModel
            {
                ActualCubicMetres = string.Empty,
                ActualDate = string.Empty,
                ActualKilograms = string.Empty,
                ActualLitres = string.Empty,
                ActualTonnes = string.Empty,
                IsNotSpecialHandling = false,
                IsSpecialHandling = true,
                NotificationNumber = notification.NotificationNumber,
                Number = "0",
                PhysicalCharacteristics = "4"
            }.Evaluate(result);
        }
        public DoesQuantityReceivedExceedToleranceHandlerTests()
        {
            details = new TestableMovementDetails
            {
                ActualQuantity = new ShipmentQuantity(100, ShipmentQuantityUnits.Tonnes)
            };
            var movementDetailsRepository = A.Fake<IMovementDetailsRepository>();
            A.CallTo(() => movementDetailsRepository.GetByMovementId(A<Guid>.Ignored))
                .Returns(details);

            handler = new DoesQuantityReceivedExceedToleranceHandler(movementDetailsRepository);
        }
        public DoesQuantityReceivedExceedToleranceHandlerTests()
        {
            details = new TestableMovementDetails
            {
                ActualQuantity = new ShipmentQuantity(100, ShipmentQuantityUnits.Tonnes)
            };
            var movementDetailsRepository = A.Fake <IMovementDetailsRepository>();

            A.CallTo(() => movementDetailsRepository.GetByMovementId(A <Guid> .Ignored))
            .Returns(details);

            handler = new DoesQuantityReceivedExceedToleranceHandler(movementDetailsRepository);
        }
 public MovementViewModelTests()
 {
     notification = new TestableNotificationApplication
     {
         Id = new Guid("07FF7B1D-A3A9-4FB1-B10B-F00EEF8FB9F8")
     };
     movement = new TestableMovement
     {
         Id = new Guid("B20B7BBE-EA7C-45F7-B6DB-04F645E7375B")
     };
     movementDetails = new TestableMovementDetails
     {
         Id = new Guid("E5DF0706-F17C-49CC-8DB2-B6A524A4C372")
     };
     shipmentInfo = new TestableShipmentInfo
     {
         Id = new Guid("B2B2ADE7-34EF-468D-BB88-72D8B5394AE6")
     };
 }
Example #6
0
 public MovementViewModelTests()
 {
     notification = new TestableNotificationApplication
     {
         Id = new Guid("07FF7B1D-A3A9-4FB1-B10B-F00EEF8FB9F8"),
         CompetentAuthority = UKCompetentAuthority.England
     };
     movement = new TestableMovement
     {
         Id = new Guid("B20B7BBE-EA7C-45F7-B6DB-04F645E7375B")
     };
     movementDetails = new TestableMovementDetails
     {
         Id = new Guid("E5DF0706-F17C-49CC-8DB2-B6A524A4C372")
     };
     shipmentInfo = new TestableShipmentInfo
     {
         Id = new Guid("B2B2ADE7-34EF-468D-BB88-72D8B5394AE6")
     };
 }