public void CreateProductTypeNullErrorTest()
        {
            List <string> errors         = new List <string>(); // TODO: Initialize to an appropriate value
            List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value

            BLProductType.CreateProductType(null, ref errors);
            AsynchLog.LogNow(errors);

            Assert.AreEqual(1, errors.Count);
        }
        public void CreateProductTypeTest()
        {
            Random rand         = new Random();
            String createString = "Super deep v turtle neck " + rand.Next(1000);

            List <string> errors         = new List <string>(); // TODO: Initialize to an appropriate value
            List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value
            int           result         = BLProductType.CreateProductType(createString, ref errors);

            Assert.AreNotEqual(result, -1);
            AsynchLog.LogNow(errors);

            ProductTypeInfo ProductType = BLProductType.ReadProductType(result, ref errors);

            AsynchLog.LogNow(errors);

            Assert.AreEqual(ProductType.product_type_id, result);
            Assert.AreEqual(ProductType.product_type_name, createString);
        }
        public void CreateProductTypeErrorTest()
        {
            List <string> errors         = new List <string>(); // TODO: Initialize to an appropriate value
            List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value

            BLProductType.CreateProductType(null, ref errors);
            AsynchLog.LogNow(errors);

            Assert.AreEqual(1, errors.Count);

            errors = new List <string>(); // TODO: Initialize to an appropriate value
            Random rand             = new Random();
            string iProductTypeName = "Louis" + rand.Next(1000);

            BLProductType.CreateProductType(iProductTypeName, ref errors);
            AsynchLog.LogNow(errors);
            BLProductType.CreateProductType(iProductTypeName, ref errors);
            AsynchLog.LogNow(errors);
            Assert.AreEqual(1, errors.Count);
        }
Exemple #4
0
 public int CreateProductType(string ProductTypeName, ref List <string> errors)
 {
     return(BLProductType.CreateProductType(ProductTypeName, ref errors));
 }