예제 #1
0
        public void Sales_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _sale_item_itemsforecast = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "8737af96-31fe-464d-8ef6-cb1e588c4593Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 6151,
                SupplierPackSize = 6114,
                InnerPackSize    = 376,
                PalletType       = "Item_PalletType",
                PalTI            = 5455,
                PalHI            = 1822,
                UOM              = "Item_UOM",
            };
            var _sale_warehouse_sales = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.Sales>(Session)
            .CheckProperty(p => p.ForecastDate, now)
            .CheckProperty(p => p.Units, 88)
            .CheckReference(p => p.Item, _sale_item_itemsforecast)
            .CheckReference(p => p.Warehouse, _sale_warehouse_sales)
            .VerifyTheMappings();
        }
        public void InventoryItem_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _inventoryitem_item_inventoryitems = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "33eeefb1-ac7b-43ab-a3bf-c69fa7d98121Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 2692,
                SupplierPackSize = 2570,
                InnerPackSize    = 5055,
                PalletType       = "Item_PalletType",
                PalTI            = 6008,
                PalHI            = 1352,
                UOM              = "Item_UOM",
            };
            var _inventoryitem_warehouse_inventoryitems = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.InventoryItem>(Session)
            .CheckProperty(p => p.CoverageDays, 4875)
            .CheckProperty(p => p.SafetyStock, 7640)
            .CheckProperty(p => p.Status, "InventoryItem_Status")
            .CheckReference(p => p.Item, _inventoryitem_item_inventoryitems)
            .CheckReference(p => p.Warehouse, _inventoryitem_warehouse_inventoryitems)
            .VerifyTheMappings();
        }
        public void Notification_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _notification_item_notifications = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "8a430ffc-1da7-4374-ad34-4d3f1a331aeaItem_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 7256,
                SupplierPackSize = 5965,
                InnerPackSize    = 7979,
                PalletType       = "Item_PalletType",
                PalTI            = 3577,
                PalHI            = 998,
                UOM              = "Item_UOM",
            };
            var _notification_warehouse_notification = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };
            var _orderproposal_orderforecastdetails_notification = new DSS1_RetailerDriverStockOptimisation.BO.OrderForecastDetails
            {
                ReplenishmentCycle        = 5236,
                AutomatedForecast         = 349,
                Quantity                  = 2222222222.22222M,
                RoundQuantity             = 6891,
                OrderInventoryDays        = 2222222222.22222M,
                RecommendedOrderDate      = now,
                SalesForecastDate         = now,
                SupplierCanDeliver        = true,
                SupplierMaxQuantity       = 2222222222.22222M,
                SupplierCoverageDays      = 3753,
                ItemCoverageDays          = 9727,
                InitialStockLevel         = 6612,
                SupplierAvailableQuantity = 484,
                SupplierSharesStock       = true,
                CreatedOn                 = now,
                Status = "OrderForecastDetails_Status",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.Notification>(Session)
            .CheckProperty(p => p.Message, "Notification_Message")
            .CheckProperty(p => p.TotalSupplierStock, 9421)
            .CheckProperty(p => p.OrderForecastQuantity, 7030)
            .CheckProperty(p => p.Diff, 1721)
            .CheckProperty(p => p.SalesForecastDate, now)
            .CheckProperty(p => p.CreatedBy, "Notification_CreatedBy")
            .CheckReference(p => p.Item, _notification_item_notifications)
            .CheckReference(p => p.Warehouse, _notification_warehouse_notification)
            .CheckReference(p => p.OrderForecastDetails, _orderproposal_orderforecastdetails_notification)
            .VerifyTheMappings();
        }
예제 #4
0
        public void Statistics_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _dashboard_warehouse_statistics = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };
            var _dashboard_item_statistics = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "cbcf0ee7-73f9-4a9d-91ba-53b7b1592c82Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 2247,
                SupplierPackSize = 5584,
                InnerPackSize    = 506,
                PalletType       = "Item_PalletType",
                PalTI            = 1012,
                PalHI            = 9698,
                UOM              = "Item_UOM",
            };
            var _dashboard_supplier_statistics = new DSS1_RetailerDriverStockOptimisation.BO.Supplier
            {
                Code = "Supplier_Code",
                Name = "Supplier_Name",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.Statistics>(Session)
            .CheckProperty(p => p.TotalUnits, 9280)
            .CheckProperty(p => p.Description, "Statistics_Description")
            .CheckProperty(p => p.Result, 9298)
            .CheckProperty(p => p.LeadTime, 6133)
            .CheckProperty(p => p.WeekDay, "Statistics_WeekDay")
            .CheckProperty(p => p.StockOnHandDate, now)
            .CheckProperty(p => p.StockOnHand, 2924)
            .CheckProperty(p => p.OrderQuantity, 5073)
            .CheckProperty(p => p.SalesQuantity, 2255)
            .CheckProperty(p => p.QuantitySalesForecast, 6658)
            .CheckProperty(p => p.StockOnHandDateFormatted, "Statistics_StockOnHandDateFormatted")
            .CheckProperty(p => p.SupplierStock, 9709)
            .CheckProperty(p => p.QuantitySum, 1034)
            .CheckProperty(p => p.SalesForecastDate, now)
            .CheckProperty(p => p.SalesForecastDateFormatted, "Statistics_SalesForecastDateFormatted")
            .CheckProperty(p => p.Threshold, 222222.22M)
            .CheckProperty(p => p.OrderDate, now)
            .CheckProperty(p => p.OrderDateFormatted, "Statistics_OrderDateFormatted")
            .CheckProperty(p => p.RealOrderQuantity, 580)
            .CheckReference(p => p.Warehouse, _dashboard_warehouse_statistics)
            .CheckReference(p => p.Item, _dashboard_item_statistics)
            .CheckReference(p => p.Supplier, _dashboard_supplier_statistics)
            .VerifyTheMappings();
        }
예제 #5
0
        public void StockOnHand_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _agreement_agreement_stockonhands = new DSS1_RetailerDriverStockOptimisation.BO.Agreement
            {
                FullTruckLoad       = true,
                AgreementDocument   = "Agreement_AgreementDocument",
                LeadTime            = "Agreement_LeadTime",
                DateCreated         = now,
                WDDeliveries        = true,
                TargetInventoryDays = 8764,
                Profile             = "Agreement_Profile",
            };
            var _stockonhand_warehouse_stockonhand = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };
            var _stockonhand_item_stocksonhand = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "92a3478b-812b-4ac5-aa84-8457682959a9Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 2137,
                SupplierPackSize = 4261,
                InnerPackSize    = 1604,
                PalletType       = "Item_PalletType",
                PalTI            = 6908,
                PalHI            = 310,
                UOM              = "Item_UOM",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.StockOnHand>(Session)
            .CheckProperty(p => p.Units, 7896)
            .CheckProperty(p => p.CurrentInventoryDays, 222222.22M)
            .CheckProperty(p => p.StockOnHandDate, now)
            .CheckProperty(p => p.LeadTime, "StockOnHand_LeadTime")
            .CheckProperty(p => p.TargetInventoryDays, 222222.22M)
            .CheckProperty(p => p.FullTrackLoad, true)
            .CheckProperty(p => p.WDDays, true)
            .CheckReference(p => p.Agreement, _agreement_agreement_stockonhands)
            .CheckReference(p => p.Warehouse, _stockonhand_warehouse_stockonhand)
            .CheckReference(p => p.Item, _stockonhand_item_stocksonhand)
            .VerifyTheMappings();
        }
        public void SLALeadTime_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _sla_item_slaleadtimes = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "2b4359a7-87fa-4b7d-8e90-5033a6f6c94dItem_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 3627,
                SupplierPackSize = 5852,
                InnerPackSize    = 8255,
                PalletType       = "Item_PalletType",
                PalTI            = 162,
                PalHI            = 7438,
                UOM              = "Item_UOM",
            };
            var _sla_warehouse_slaleadtimes = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.SLALeadTime>(Session)
            .CheckProperty(p => p.AgreedLeadTime, 522)
            .CheckProperty(p => p.RealLeadTime, 3380)
            .CheckProperty(p => p.Percentage, 222222.22M)
            .CheckProperty(p => p.ItemDescription, "SLALeadTime_ItemDescription")
            .CheckProperty(p => p.DateFormatted, "SLALeadTime_DateFormatted")
            .CheckProperty(p => p.Threshold, 222222.22M)
            .CheckProperty(p => p.SLALeadDate, now)
            .CheckProperty(p => p.Month, 5619)
            .CheckProperty(p => p.MonthlyDelayed, 222222.22M)
            .CheckProperty(p => p.MontlhyOrders, 222222.22M)
            .CheckProperty(p => p.MonthlyPercentage, 222222.22M)
            .CheckReference(p => p.Item, _sla_item_slaleadtimes)
            .CheckReference(p => p.Warehouse, _sla_warehouse_slaleadtimes)
            .VerifyTheMappings();
        }
        public void DeliverySchedule_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _forecast_supplier_deliveryschedules = new DSS1_RetailerDriverStockOptimisation.BO.Supplier
            {
                Code = "Supplier_Code",
                Name = "Supplier_Name",
            };
            var _forecast_item_deliveryschedules = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "eed02b3d-68f4-4b88-8ce3-b98afc728fd4Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 1930,
                SupplierPackSize = 7383,
                InnerPackSize    = 9520,
                PalletType       = "Item_PalletType",
                PalTI            = 7431,
                PalHI            = 6344,
                UOM              = "Item_UOM",
            };
            var _forecast_warehouse_deliveryschedules = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.DeliverySchedule>(Session)
            .CheckProperty(p => p.LeadTime, 5120)
            .CheckProperty(p => p.Weekday, 9596)
            .CheckProperty(p => p.NameOfDay, "DeliverySchedule_NameOfDay")
            .CheckProperty(p => p.DBWeekday, 6539)
            .CheckReference(p => p.Supplier, _forecast_supplier_deliveryschedules)
            .CheckReference(p => p.Item, _forecast_item_deliveryschedules)
            .CheckReference(p => p.Warehouse, _forecast_warehouse_deliveryschedules)
            .VerifyTheMappings();
        }
        public void SLADelivery_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _sla_item_sladeliveries = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "8d5821db-dd6a-4780-933a-440d5e960329Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 6460,
                SupplierPackSize = 4445,
                InnerPackSize    = 4626,
                PalletType       = "Item_PalletType",
                PalTI            = 1779,
                PalHI            = 950,
                UOM              = "Item_UOM",
            };
            var _sla_warehouse_sladelivery = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.SLADelivery>(Session)
            .CheckProperty(p => p.OrderedQuantities, 222222.22M)
            .CheckProperty(p => p.DeliveredQuantities, 222222.22M)
            .CheckProperty(p => p.Percentage, 222222.22M)
            .CheckProperty(p => p.ItemDescription, "SLADelivery_ItemDescription")
            .CheckProperty(p => p.Threshold, 222222.22M)
            .CheckProperty(p => p.SLADate, now)
            .CheckProperty(p => p.DateFormatted, "SLADelivery_DateFormatted")
            .CheckProperty(p => p.Month, 7434)
            .CheckReference(p => p.Item, _sla_item_sladeliveries)
            .CheckReference(p => p.Warehouse, _sla_warehouse_sladelivery)
            .VerifyTheMappings();
        }
예제 #9
0
        public void PastOrder_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _pastorder_item_pastorders = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "b1ac3a9d-90df-4b3c-b365-057e200f9ed2Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 4261,
                SupplierPackSize = 8639,
                InnerPackSize    = 4286,
                PalletType       = "Item_PalletType",
                PalTI            = 3193,
                PalHI            = 2821,
                UOM              = "Item_UOM",
            };
            var _pastorder_warehouse_pastorders = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.PastOrder>(Session)
            .CheckProperty(p => p.OrderNumber, 8141)
            .CheckProperty(p => p.WrittenDate, now)
            .CheckProperty(p => p.NotBeforeDate, now)
            .CheckProperty(p => p.QuantityOrdered, 536)
            .CheckProperty(p => p.ReceiveDate, now)
            .CheckProperty(p => p.QuantityReceived, 6161)
            .CheckProperty(p => p.Caller, "PastOrder_Caller")
            .CheckReference(p => p.Item, _pastorder_item_pastorders)
            .CheckReference(p => p.Warehouse, _pastorder_warehouse_pastorders)
            .VerifyTheMappings();
        }
예제 #10
0
        public void TransportUnCap_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _transportuncap_warehouse_transportuncap = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.TransportUnCap>(Session)
            .CheckProperty(p => p.UOP, "TransportUnCap_UOP")
            .CheckProperty(p => p.PercRound, 2222222222.22222M)
            .CheckProperty(p => p.Tuc1, 2222222222.22222M)
            .CheckProperty(p => p.SplitOcInd, "TransportUnCap_SplitOcInd")
            .CheckProperty(p => p.Status, "TransportUnCap_Status")
            .CheckReference(p => p.Warehouse, _transportuncap_warehouse_transportuncap)
            .VerifyTheMappings();
        }
        public void Platform_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _sla_item_platform = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "09fb359d-afca-4807-ab3f-42b4f4e6bdd1Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 1983,
                SupplierPackSize = 1897,
                InnerPackSize    = 8760,
                PalletType       = "Item_PalletType",
                PalTI            = 2174,
                PalHI            = 6771,
                UOM              = "Item_UOM",
            };
            var _sla_warehouse_platform = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.Platform>(Session)
            .CheckProperty(p => p.percentage, 222222.22M)
            .CheckProperty(p => p.ItemDescription, "Platform_ItemDescription")
            .CheckProperty(p => p.RealOrderedQuantities, 222222.22M)
            .CheckProperty(p => p.ForecastOrders, 222222.22M)
            .CheckProperty(p => p.Month, "Platform_Month")
            .CheckReference(p => p.Item, _sla_item_platform)
            .CheckReference(p => p.Warehouse, _sla_warehouse_platform)
            .VerifyTheMappings();
        }
예제 #12
0
        public void Stats_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _stocklevelkpi_warehouse_stats = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };
            var _stocklevelkpi_item_stats = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "503bf3c8-467b-47d4-8acd-02c46ab23130Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 940,
                SupplierPackSize = 5009,
                InnerPackSize    = 6760,
                PalletType       = "Item_PalletType",
                PalTI            = 6022,
                PalHI            = 7389,
                UOM              = "Item_UOM",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.Stats>(Session)
            .CheckProperty(p => p.Percentage, 222222.22M)
            .CheckProperty(p => p.Threshold, 222222.22M)
            .CheckProperty(p => p.DateFormatted, "Stats_DateFormatted")
            .CheckProperty(p => p.Date, now)
            .CheckReference(p => p.Warehouse, _stocklevelkpi_warehouse_stats)
            .CheckReference(p => p.Item, _stocklevelkpi_item_stats)
            .VerifyTheMappings();
        }
예제 #13
0
        public void OrderForecastStatistic_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _orderforecastdashboard_item_orderforecaststatistics = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "5e0455f2-825e-4980-a681-4c7ad91b8b82Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 2356,
                SupplierPackSize = 6474,
                InnerPackSize    = 6358,
                PalletType       = "Item_PalletType",
                PalTI            = 1603,
                PalHI            = 9285,
                UOM              = "Item_UOM",
            };
            var _orderforecastdashboard_warehouse_orderforecaststatistics = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.OrderForecastStatistic>(Session)
            .CheckProperty(p => p.Quantity, 222222.22M)
            .CheckProperty(p => p.RoundQuantity, 7821)
            .CheckProperty(p => p.OrderDate, now)
            .CheckProperty(p => p.OrderDateFormatted, "OrderForecastStatistic_OrderDateFormatted")
            .CheckReference(p => p.Item, _orderforecastdashboard_item_orderforecaststatistics)
            .CheckReference(p => p.Warehouse, _orderforecastdashboard_warehouse_orderforecaststatistics)
            .VerifyTheMappings();
        }
예제 #14
0
 public WarehouseFormViewModel()
 {
     Warehouse = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse();
 }
        public void Agreement_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _agreement_agreementstatuses_agreement = new DSS1_RetailerDriverStockOptimisation.BO.AgreementStatus
            {
                IssuedBy           = "AgreementStatus_IssuedBy",
                Status             = "AgreementStatus_Status",
                DateIssued         = now,
                ApprovedBySonae    = true,
                ApprovedBySupplier = true,
                InProgress         = true,
                Active             = true,
                UnderRevision      = true,
            };
            var _agreement_agreementstatuses_agreement2 = new DSS1_RetailerDriverStockOptimisation.BO.AgreementStatus
            {
                IssuedBy           = "AgreementStatus_IssuedBy",
                Status             = "AgreementStatus_Status",
                DateIssued         = now,
                ApprovedBySonae    = true,
                ApprovedBySupplier = true,
                InProgress         = true,
                Active             = true,
                UnderRevision      = true,
            };
            var _agreement_items_agreements = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "85c41988-a9ba-4eda-9414-d5e910f388a2Item_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 5412,
                SupplierPackSize = 2461,
                InnerPackSize    = 5128,
                PalletType       = "Item_PalletType",
                PalTI            = 965,
                PalHI            = 4274,
                UOM              = "Item_UOM",
            };
            var _agreement_items_agreements2 = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "1111",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 2720,
                SupplierPackSize = 6994,
                InnerPackSize    = 6127,
                PalletType       = "Item_PalletType",
                PalTI            = 161,
                PalHI            = 6362,
                UOM              = "Item_UOM",
            };
            var _agreement_supplier_agreements = new DSS1_RetailerDriverStockOptimisation.BO.Supplier
            {
                Code = "Supplier_Code",
                Name = "Supplier_Name",
            };
            var _agreement_warehouses_agreements = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };
            var _agreement_warehouses_agreements2 = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };
            var _agreement_stockonhands_agreement = new DSS1_RetailerDriverStockOptimisation.BO.StockOnHand
            {
                Units = 3710,
                CurrentInventoryDays = 222222.22M,
                StockOnHandDate      = now,
                LeadTime             = "StockOnHand_LeadTime",
                TargetInventoryDays  = 222222.22M,
                FullTrackLoad        = true,
                WDDays = true,
            };
            var _agreement_stockonhands_agreement2 = new DSS1_RetailerDriverStockOptimisation.BO.StockOnHand
            {
                Units = 1751,
                CurrentInventoryDays = 222222.22M,
                StockOnHandDate      = now,
                LeadTime             = "StockOnHand_LeadTime",
                TargetInventoryDays  = 222222.22M,
                FullTrackLoad        = true,
                WDDays = true,
            };
            var _agreement_transportuncaps_agreement = new DSS1_RetailerDriverStockOptimisation.BO.TransportUnCap
            {
                UOP        = "TransportUnCap_UOP",
                PercRound  = 2222222222.22222M,
                Tuc1       = 2222222222.22222M,
                SplitOcInd = "TransportUnCap_SplitOcInd",
                Status     = "TransportUnCap_Status",
            };
            var _agreement_transportuncaps_agreement2 = new DSS1_RetailerDriverStockOptimisation.BO.TransportUnCap
            {
                UOP        = "TransportUnCap_UOP",
                PercRound  = 2222222222.22222M,
                Tuc1       = 2222222222.22222M,
                SplitOcInd = "TransportUnCap_SplitOcInd",
                Status     = "TransportUnCap_Status",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.Agreement>(Session)
            .CheckProperty(p => p.FullTruckLoad, true)
            .CheckProperty(p => p.AgreementDocument, "Agreement_AgreementDocument")
            .CheckProperty(p => p.LeadTime, "Agreement_LeadTime")
            .CheckProperty(p => p.DateCreated, now)
            .CheckProperty(p => p.WDDeliveries, true)
            .CheckProperty(p => p.TargetInventoryDays, 6622)
            .CheckProperty(p => p.Profile, "Agreement_Profile")
            .CheckBag(p => p.AgreementStatuses, (new List <DSS1_RetailerDriverStockOptimisation.BO.AgreementStatus>
            {
                _agreement_agreementstatuses_agreement,
                _agreement_agreementstatuses_agreement2
            }))
            .CheckBag(p => p.Items, (new List <DSS1_RetailerDriverStockOptimisation.BO.Item>
            {
                _agreement_items_agreements,
                _agreement_items_agreements2
            }))
            .CheckReference(p => p.Supplier, _agreement_supplier_agreements)
            .CheckBag(p => p.Warehouses, (new List <DSS1_RetailerDriverStockOptimisation.BO.Warehouse>
            {
                _agreement_warehouses_agreements,
                _agreement_warehouses_agreements2
            }))
            .CheckBag(p => p.StockOnHands, (new List <DSS1_RetailerDriverStockOptimisation.BO.StockOnHand>
            {
                _agreement_stockonhands_agreement,
                _agreement_stockonhands_agreement2
            }))
            .CheckBag(p => p.TransportUnCaps, (new List <DSS1_RetailerDriverStockOptimisation.BO.TransportUnCap>
            {
                _agreement_transportuncaps_agreement,
                _agreement_transportuncaps_agreement2
            }))
            .VerifyTheMappings();
        }
예제 #16
0
        public void OrderForecastDetails_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _orderproposal_warehouse_replenishmentcycle = new DSS1_RetailerDriverStockOptimisation.BO.Warehouse
            {
                Code        = "Warehouse_Code",
                Description = "Warehouse_Description",
                FlowType    = "Warehouse_FlowType",
            };
            var _orderproposal_item_replenishmentcycle = new DSS1_RetailerDriverStockOptimisation.BO.Item
            {
                SKU              = "68e95eb3-1f57-4e61-82ab-c5eeff2484acItem_SKU",
                Description      = "Item_Description",
                UPC              = "Item_UPC",
                AvgDailyDemand   = 222222.22M,
                PalletSize       = 9931,
                SupplierPackSize = 8703,
                InnerPackSize    = 8448,
                PalletType       = "Item_PalletType",
                PalTI            = 3011,
                PalHI            = 5370,
                UOM              = "Item_UOM",
            };
            var _orderproposal_orderforecast_orderforecastdetails = new DSS1_RetailerDriverStockOptimisation.BO.OrderForecast
            {
                ImportId  = 9967,
                Status    = "OrderForecast_Status",
                CreatedBy = "OrderForecast_CreatedBy",
                CreatedOn = now,
                StartDate = now,
                EndDate   = now,
                State     = "OrderForecast_State",
            };
            var _orderproposal_notification_orderforecastdetails = new DSS1_RetailerDriverStockOptimisation.BO.Notification
            {
                Message               = "Notification_Message",
                TotalSupplierStock    = 8630,
                OrderForecastQuantity = 3921,
                Diff = 1087,
                SalesForecastDate = now,
                CreatedBy         = "Notification_CreatedBy",
            };
            var _orderproposal_comments_orderforecastdetails = new DSS1_RetailerDriverStockOptimisation.BO.Comment
            {
                Text    = "Comment_Text",
                AddedBy = "Comment_AddedBy",
            };
            var _orderproposal_comments_orderforecastdetails2 = new DSS1_RetailerDriverStockOptimisation.BO.Comment
            {
                Text    = "Comment_Text",
                AddedBy = "Comment_AddedBy",
            };

            new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.OrderForecastDetails>(Session)
            .CheckProperty(p => p.ReplenishmentCycle, 8054)
            .CheckProperty(p => p.AutomatedForecast, 8786)
            .CheckProperty(p => p.Quantity, 2222222222.22222M)
            .CheckProperty(p => p.RecommendedOrderDate, now)
            .CheckProperty(p => p.SalesForecastDate, now)
            .CheckProperty(p => p.SupplierCanDeliver, true)
            .CheckProperty(p => p.SupplierMaxQuantity, 2222222222.22222M)
            .CheckProperty(p => p.SupplierCoverageDays, 9995)
            .CheckProperty(p => p.ItemCoverageDays, 1553)
            .CheckProperty(p => p.InitialStockLevel, 6286)
            .CheckProperty(p => p.SupplierAvailableQuantity, 6124)
            .CheckProperty(p => p.SupplierSharesStock, true)
            .CheckProperty(p => p.CreatedOn, now)
            .CheckProperty(p => p.Status, "OrderForecastDetails_Status")
            .CheckReference(p => p.Warehouse, _orderproposal_warehouse_replenishmentcycle)
            .CheckReference(p => p.Item, _orderproposal_item_replenishmentcycle)
            .CheckReference(p => p.OrderForecast, _orderproposal_orderforecast_orderforecastdetails)
            .CheckReference(p => p.Notification, _orderproposal_notification_orderforecastdetails)
            .CheckBag(p => p.Comments, (new List <DSS1_RetailerDriverStockOptimisation.BO.Comment>
            {
                _orderproposal_comments_orderforecastdetails,
                _orderproposal_comments_orderforecastdetails2
            }))
            .VerifyTheMappings();
        }