Ejemplo n.º 1
0
        private int calculatePromotion()
        {
            int calculateValue = 0;

            try
            {
                int activePromotionId = Convert.ToInt32(cmbActivePromotion.SelectedValue == null ? "0" : cmbActivePromotion.SelectedValue);
                int skuId             = Convert.ToInt32(cmbSKUIDPrice.SelectedValue == null ? "0" : cmbSKUIDPrice.SelectedValue);

                CalculateResult calculateResult = new CalculateResult();
                calculateValue = calculateResult.CalculateFinalResult(skuId, activePromotionId, Convert.ToInt32(txtUnit.Text), SkuIddatapath);
            }
            catch (Exception ex)
            {
                Logger.WriteException(ex);
            }
            return(calculateValue);
        }
Ejemplo n.º 2
0
 public void ScenarioAATest()
 {
     JsonParser.JsonParserToList(path, promotionData);
     Assert.Equal(50, calculateResult.CalculateFinalResult(1, 1, 1, SkuIddatapath));
 }