public SaleItem(Product product, Unit unit) { Product = product; Unit = unit; AddRule(new SimpleRule("Price", "The Price can not be negative.", () => Price < 0m)); AddRule(new SimpleRule("BasicDutyType", "The BasicDutyType should not be null!", () => BasicDutyType == null)); }
public void Unit_Should_Be_One_Of_The_Units_Of_Product() { var product = new Product("book A"); product.AddUnit(new Unit("bag")); }
public SaleItem(Product product) : this(product, product.Units[0]) { }
public void SetUp() { _stubProduct = new Product("book"); }