コード例 #1
0
        public void total_is_product_of_quantity_by_item_price_corresponding_to_existing_item_code(
            String itemCode,
            double quantity,
            double unitPrice)
        {
            Result total = cashRegister.Total(priceQuery.FindPrice(itemCode), Quantity.ValueOf(quantity));

            Check.That(total).IsEqualTo(Result.Found(Price.ValueOf(quantity * unitPrice)));
        }
コード例 #2
0
 public void find_the_price_given_an_item_code(String itemCode, double unitPrice)
 {
     Check.That(priceQuery.FindPrice(itemCode)).IsEqualTo(Result.Found(Price.ValueOf(unitPrice)));
 }