Exemple #1
0
        public void BreakList_GetMinAmount()   //should always be 0 since there's 0 stock
        {
            testTarget.QtyInterval = 5;

            Assert.AreEqual(0L, testTarget.GetMinimumAmountToFulfillInterval(5));
            Assert.AreEqual(4L, testTarget.GetMinimumAmountToFulfillInterval(1));
            Assert.AreEqual(3L, testTarget.GetMinimumAmountToFulfillInterval(7));
        }
Exemple #2
0
        public void UninitializedBreakList_GetMinAmount()   //should always be 0 since there's 0 stock
        {
            var tmp = new BaseOrderable();

            foreach (int i in allRandIntRanges)
            {
                Assert.AreEqual(0L, tmp.GetMinimumAmountToFulfillInterval(i));
            }
        }
Exemple #3
0
        public ResolverMatrix(BaseOrderable part, long qty)
        {
            ID = part.ID;

            MaxOrderable  = part.GetMaxOrderableQty(qty);
            MinAdjustment = part.GetMinimumAmountToFulfillInterval(qty);

            UnitCost  = part.GetUnitPriceForQty(MaxOrderable);
            TotalCost = UnitCost * MaxOrderable;

            isMOQ1 = part.QtyInterval == 1;
        }