public void Test_SetPricing_Stores_Returns_Correct_Pricing()
        {
            _posTermService.SetPricing('A', 1.25, 3, 3.0);
            _posTermService.SetPricing('B', 4.25);
            _posTermService.SetPricing('C', 1.00, 6, 5.0);
            _posTermService.SetPricing('D', 0.75);
            Hashtable table      = _posTermService.GetPricingTable();
            ItemPrice itemPriceC = (ItemPrice)table['C'];

            Assert.IsInstanceOfType(itemPriceC, typeof(ItemPrice));
            Assert.IsTrue(itemPriceC.CalculatePrice(6) == 5.0);
        }
Пример #2
0
 public void Test_CalculatePrice_Quantity_LessThan_Bulk()
 {
     Assert.IsTrue(_itemPrice.CalculatePrice(2) == 2.50);
 }