public void MarkupPercentDeterminationRule_Initial_parameters_Must_Be_Set()
        {
            var mpRule = new MarkupPercentDeterminationRule(MarkupPercentDeterminationRuleType.ByArticle);

            Assert.AreEqual(MarkupPercentDeterminationRuleType.ByArticle, mpRule.Type);
            Assert.IsNull(mpRule.MarkupPercentValue);
        }
        public void MarkupPercentDeterminationRule_Must_Set_Type_To_Custom_When_MarkupPercentValue_Is_Set_In_Constructor()
        {
            var mpRule = new MarkupPercentDeterminationRule(75);

            Assert.AreEqual(MarkupPercentDeterminationRuleType.Custom, mpRule.Type);
            Assert.AreEqual(75, mpRule.MarkupPercentValue);
        }
Пример #3
0
        public void AccountingPriceCalcByPurchaseCost_Initial_Parameters_Must_Be_Set()
        {
            var mpRule = new MarkupPercentDeterminationRule(MarkupPercentDeterminationRuleType.ByArticle);
            var apCalc = new AccountingPriceCalcByPurchaseCost(PurchaseCostDeterminationRuleType.ByAveragePurchasePrice, mpRule);

            Assert.AreEqual(PurchaseCostDeterminationRuleType.ByAveragePurchasePrice, apCalc.PurchaseCostDeterminationRuleType);
            Assert.AreEqual(mpRule, apCalc.MarkupPercentDeterminationRule);
        }
Пример #4
0
        public void AccountingPriceCalcRule_When_Init_By_AccountingPriceCalcByPurchaseCost_Type_Must_Equal_ByPurchaseCost()
        {
            var mpdRule = new MarkupPercentDeterminationRule(28);
            var apCalc  = new AccountingPriceCalcByPurchaseCost(PurchaseCostDeterminationRuleType.ByMaximalPurchaseCost, mpdRule);
            var apRule  = new AccountingPriceCalcRule(apCalc);

            Assert.IsNull(apRule.CalcByCurrentAccountingPrice);
            Assert.AreEqual(apCalc, apRule.CalcByPurchaseCost);
            Assert.AreEqual(AccountingPriceCalcRuleType.ByPurchaseCost, apRule.Type);
        }