Ejemplo n.º 1
0
        public void SaleUnit_Should_Be_The_Same_With_PurchaseUnit_By_Default()
        {
            var _stubProductDescriptor = new ProductDescriptor("book");
            var purchaseUnit = new Unit("box");
            var _stubPurchaseItem = new PurchaseItem(_stubProductDescriptor, purchaseUnit);

            var sut = new Product(_stubPurchaseItem);

            Assert.AreEqual(purchaseUnit, sut.SaleUnit);
        }
Ejemplo n.º 2
0
 public static Product CreateStubProduct(decimal price)
 {
     var productDescriptor = new ProductDescriptor("book");
     var purchaseItem = new PurchaseItem(productDescriptor);
     return new Product(purchaseItem) { Price = price };
 }