Beispiel #1
0
        public void Driver_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _driver_employer_driver = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };

            new PersistenceSpecification <DSS3_LogisticsPoolingForUrbanDistribution.BO.Driver>(Session)
            .CheckProperty(p => p.Id, 9118)
            .CheckProperty(p => p.UserName, "b4b8a92d-9dc8-4365-a816-7782e0306069Driver_UserName")
            .CheckProperty(p => p.PasswordHash, "Driver_PasswordHash")
            .CheckProperty(p => p.SecurityStamp, "Driver_SecurityStamp")
            .CheckProperty(p => p.EmailConfirmed, true)
            .CheckProperty(p => p.LockoutEnabled, true)
            .CheckProperty(p => p.PhoneNumberConfirmed, true)
            .CheckProperty(p => p.TwoFactorEnabled, true)
            .CheckProperty(p => p.AccessFailedCount, 8357)
            .CheckProperty(p => p.Name, "Driver_Name")
            .CheckProperty(p => p.Email, "Driver_Email")
            .CheckProperty(p => p.PhoneNumber, "Driver_PhoneNumber")
            .CheckProperty(p => p.LockoutEndDate, now)
            .CheckReference(p => p.Employer, _driver_employer_driver)
            .VerifyTheMappings();
        }
Beispiel #2
0
        public void Activity_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _vrpsolution_order_activity = new DSS3_LogisticsPoolingForUrbanDistribution.BO.ShippingOrder
            {
                DepartureDate   = now,
                ArrivalDate     = now,
                Shipper         = "ShippingOrder_Shipper",
                Carrier         = "ShippingOrder_Carrier",
                ItemDescription = "ShippingOrder_ItemDescription",
                Conditions      = "ShippingOrder_Conditions",
                AggregateVolume = 222222.22M,
                Priority        = 1271,
            };
            var _vrpsolution_point_activity = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };

            new PersistenceSpecification <DSS3_LogisticsPoolingForUrbanDistribution.BO.Activity>(Session)
            .CheckProperty(p => p.TravelDistance, 2118)
            .CheckProperty(p => p.TravelDuration, 9573)
            .CheckReference(p => p.Order, _vrpsolution_order_activity)
            .CheckReference(p => p.Point, _vrpsolution_point_activity)
            .VerifyTheMappings();
        }
        public void LegVolumeDetails_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _utilsbo_origin_legvolumedetails = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };
            var _utilsbo_destination_legvolumedetails_1 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };

            new PersistenceSpecification <DSS3_LogisticsPoolingForUrbanDistribution.BO.LegVolumeDetails>(Session)
            .CheckProperty(p => p.FreeSpace, 222222.22M)
            .CheckProperty(p => p.Time, "LegVolumeDetails_Time")
            .CheckProperty(p => p.Distance, 7183)
            .CheckProperty(p => p.CurrentLoad, 222222.22M)
            .CheckReference(p => p.Origin, _utilsbo_origin_legvolumedetails)
            .CheckReference(p => p.Destination, _utilsbo_destination_legvolumedetails_1)
            .VerifyTheMappings();
        }
        public void ShippingOrder_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _actionsbo_shipment_shippingorders = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Shipment
            {
                Owner          = "Shipment_Owner",
                DepartureTime  = now,
                CurrentStatus  = "Shipment_CurrentStatus",
                Temperature    = "Shipment_Temperature",
                LoadPercentage = 9319,
                TotalVolume    = 222222.22M,
                AverageVolume  = 222222.22M,
                MaxTravelTime  = 7944,
            };
            var _actionsbo_shipment_shippingorders2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Shipment
            {
                Owner          = "Shipment_Owner",
                DepartureTime  = now,
                CurrentStatus  = "Shipment_CurrentStatus",
                Temperature    = "Shipment_Temperature",
                LoadPercentage = 5253,
                TotalVolume    = 222222.22M,
                AverageVolume  = 222222.22M,
                MaxTravelTime  = 823,
            };
            var _ordersbo_departurepoint_shippingorder = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };
            var _ordersbo_arrivalpoint_shippingorder = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };
            var _ordersbo_statusevolution_shippingorder = new DSS3_LogisticsPoolingForUrbanDistribution.BO.StatusEvolution
            {
                TimeChanged = now,
                Description = "StatusEvolution_Description",
            };
            var _ordersbo_statusevolution_shippingorder2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.StatusEvolution
            {
                TimeChanged = now,
                Description = "StatusEvolution_Description",
            };
            var _ordersbo_parent_shippingorder = new DSS3_LogisticsPoolingForUrbanDistribution.BO.ShippingOrder
            {
                DepartureDate   = now,
                ArrivalDate     = now,
                Shipper         = "ShippingOrder_Shipper",
                Carrier         = "ShippingOrder_Carrier",
                ItemDescription = "ShippingOrder_ItemDescription",
                Conditions      = "ShippingOrder_Conditions",
                AggregateVolume = 222222.22M,
                Priority        = 9512,
            };
            var _ordersbo_plannedvolume_shippingorder = new DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume
            {
                Weight = 222222.22M,
            };
            var _ordersbo_plannedvolume_shippingorder2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume
            {
                Weight = 222222.22M,
            };
            var _ordersbo_actualvolume_shippingorder = new DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume
            {
                Weight = 222222.22M,
            };
            var _ordersbo_actualvolume_shippingorder2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume
            {
                Weight = 222222.22M,
            };
            var _ordersbo_itemtype_shippingorder = new DSS3_LogisticsPoolingForUrbanDistribution.BO.ItemType
            {
                Description = "ItemType_Description",
                Temperature = 6695,
            };

            new PersistenceSpecification <DSS3_LogisticsPoolingForUrbanDistribution.BO.ShippingOrder>(Session)
            .CheckProperty(p => p.DepartureDate, now)
            .CheckProperty(p => p.ArrivalDate, now)
            .CheckProperty(p => p.Shipper, "ShippingOrder_Shipper")
            .CheckProperty(p => p.Carrier, "ShippingOrder_Carrier")
            .CheckProperty(p => p.ItemDescription, "ShippingOrder_ItemDescription")
            .CheckProperty(p => p.Conditions, "ShippingOrder_Conditions")
            .CheckProperty(p => p.AggregateVolume, 222222.22M)
            .CheckProperty(p => p.Priority, 5417)
            .CheckBag(p => p.Shipment, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.Shipment>
            {
                _actionsbo_shipment_shippingorders,
                _actionsbo_shipment_shippingorders2
            }))
            .CheckReference(p => p.DeparturePoint, _ordersbo_departurepoint_shippingorder)
            .CheckReference(p => p.ArrivalPoint, _ordersbo_arrivalpoint_shippingorder)
            .CheckBag(p => p.StatusEvolution, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.StatusEvolution>
            {
                _ordersbo_statusevolution_shippingorder,
                _ordersbo_statusevolution_shippingorder2
            }))
            .CheckReference(p => p.Parent, _ordersbo_parent_shippingorder)
            .CheckBag(p => p.PlannedVolume, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume>
            {
                _ordersbo_plannedvolume_shippingorder,
                _ordersbo_plannedvolume_shippingorder2
            }))
            .CheckBag(p => p.ActualVolume, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume>
            {
                _ordersbo_actualvolume_shippingorder,
                _ordersbo_actualvolume_shippingorder2
            }))
            .CheckReference(p => p.ItemType, _ordersbo_itemtype_shippingorder)
            .VerifyTheMappings();
        }
Beispiel #5
0
        public void Shipment_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _actionsbo_shippingorders_shipment = new DSS3_LogisticsPoolingForUrbanDistribution.BO.ShippingOrder
            {
                DepartureDate   = now,
                ArrivalDate     = now,
                Shipper         = "ShippingOrder_Shipper",
                Carrier         = "ShippingOrder_Carrier",
                ItemDescription = "ShippingOrder_ItemDescription",
                Conditions      = "ShippingOrder_Conditions",
                AggregateVolume = 222222.22M,
                Priority        = 1726,
            };
            var _actionsbo_shippingorders_shipment2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.ShippingOrder
            {
                DepartureDate   = now,
                ArrivalDate     = now,
                Shipper         = "ShippingOrder_Shipper",
                Carrier         = "ShippingOrder_Carrier",
                ItemDescription = "ShippingOrder_ItemDescription",
                Conditions      = "ShippingOrder_Conditions",
                AggregateVolume = 222222.22M,
                Priority        = 8201,
            };
            var _actionsbo_shipmentstatus_shipment = new DSS3_LogisticsPoolingForUrbanDistribution.BO.ShipmentStatus
            {
                TimeReported = now,
                Description  = "ShipmentStatus_Description",
                User         = "******",
            };
            var _actionsbo_shipmentstatus_shipment2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.ShipmentStatus
            {
                TimeReported = now,
                Description  = "ShipmentStatus_Description",
                User         = "******",
            };
            var _actionsbo_departurepoint_shipment = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };
            var _actionsbo_finaldestination_shipment_1 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Location
            {
                Name     = "Location_Name",
                Street   = "Location_Street",
                City     = "Location_City",
                Country  = "Location_Country",
                Number   = "Location_Number",
                PostCode = "Location_PostCode",
                Label    = "Location_Label",
            };
            var _actionsbo_driver_shipment = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Driver
            {
                Id                   = 6688,
                UserName             = "******",
                PasswordHash         = "Driver_PasswordHash",
                SecurityStamp        = "Driver_SecurityStamp",
                EmailConfirmed       = true,
                LockoutEnabled       = true,
                PhoneNumberConfirmed = true,
                TwoFactorEnabled     = true,
                AccessFailedCount    = 6962,
                Name                 = "Driver_Name",
                Email                = "Driver_Email",
                PhoneNumber          = "Driver_PhoneNumber",
                LockoutEndDate       = now,
            };
            var _actionsbo_occupiedvolume_shipment_1 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.CustomVolume
            {
                Weight = 222222.22M,
            };
            var _actionsbo_acceptedconditions_shipment = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Condition
            {
                Description = "Condition_Description",
            };
            var _actionsbo_acceptedconditions_shipment2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Condition
            {
                Description = "Condition_Description",
            };
            var _actionsbo_vehiculetype_shipment = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Vehicule
            {
                OverHeadCost            = 222222.22M,
                CalculatedTimeCost      = 222222.22M,
                CalculatedDistanceCost  = 222222.22M,
                CalculatedOwnershipCost = 222222.22M,
                VehiculeType            = "Vehicule_VehiculeType",
                Volume           = "Vehicule_Volume",
                CO2perKm         = 222222.22M,
                AmortizationType = "Vehicule_AmortizationType",
                MaximumLoad      = 222222.22M,
            };
            var _actionsbo_path_shipment_2 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Point
            {
                LocId       = 833,
                Time        = 751,
                Distance    = 2145,
                CurrentLoad = 222222.22M,
            };
            var _actionsbo_path_shipment_22 = new DSS3_LogisticsPoolingForUrbanDistribution.BO.Point
            {
                LocId       = 7501,
                Time        = 1091,
                Distance    = 9420,
                CurrentLoad = 222222.22M,
            };

            new PersistenceSpecification <DSS3_LogisticsPoolingForUrbanDistribution.BO.Shipment>(Session)
            .CheckProperty(p => p.Owner, "Shipment_Owner")
            .CheckProperty(p => p.DepartureTime, now)
            .CheckProperty(p => p.Temperature, "Shipment_Temperature")
            .CheckProperty(p => p.LoadPercentage, 6077)
            .CheckProperty(p => p.TotalVolume, 222222.22M)
            .CheckProperty(p => p.AverageVolume, 222222.22M)
            .CheckProperty(p => p.MaxTravelTime, 7344)
            .CheckBag(p => p.ShippingOrders, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.ShippingOrder>
            {
                _actionsbo_shippingorders_shipment,
                _actionsbo_shippingorders_shipment2
            }))
            .CheckBag(p => p.ShipmentStatus, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.ShipmentStatus>
            {
                _actionsbo_shipmentstatus_shipment,
                _actionsbo_shipmentstatus_shipment2
            }))
            .CheckReference(p => p.DeparturePoint, _actionsbo_departurepoint_shipment)
            .CheckReference(p => p.FinalDestination, _actionsbo_finaldestination_shipment_1)
            .CheckReference(p => p.Driver, _actionsbo_driver_shipment)
            .CheckReference(p => p.OccupiedVolume, _actionsbo_occupiedvolume_shipment_1)
            .CheckBag(p => p.AcceptedConditions, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.Condition>
            {
                _actionsbo_acceptedconditions_shipment,
                _actionsbo_acceptedconditions_shipment2
            }))
            .CheckReference(p => p.VehiculeType, _actionsbo_vehiculetype_shipment)
            .CheckBag(p => p.Path, (new List <DSS3_LogisticsPoolingForUrbanDistribution.BO.Point>
            {
                _actionsbo_path_shipment_2,
                _actionsbo_path_shipment_22
            }))
            .VerifyTheMappings();
        }