Ejemplo n.º 1
0
        public virtual void SetProductItemDetails(ProductItemDetails productItemDetails)
        {
            if (CanSetProductItemDetails(productItemDetails) != string.Empty)
            {
                throw new InvalidOperationException();
            }

            this.productItemDetails = productItemDetails;
        }
Ejemplo n.º 2
0
        private string CanSetProductItemDetails(ProductItemDetails productItemDetails)
        {
            if (productItemDetails.Product_Description.Any(x => x > 255))
            {
                return("Product Description must have Unicode Characters");
            }

            if (productItemDetails.Other_Details.Length > 120)
            {
                return("Other Details must be less than 120 Characters");
            }

            return(string.Empty);
        }
Ejemplo n.º 3
0
 public Product()
 {
     productInventoryDetails = NoneInventoryDetails;
     productItemDetails      = NoneItemDetails;
 }