Exemplo n.º 1
0
        public void CreateProductCuttingNullErrorTest()
        {
            List <string> errors         = new List <string>(); // TODO: Initialize to an appropriate value
            List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value

            BLProductCutting.CreateProductCutting(null, ref errors);
            AsynchLog.LogNow(errors);

            Assert.AreEqual(1, errors.Count);
        }
Exemplo n.º 2
0
        public void CreateProductCuttingTest()
        {
            Random rand         = new Random();
            String createString = "Midget " + 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         = BLProductCutting.CreateProductCutting(createString, ref errors);

            AsynchLog.LogNow(errors);
            Assert.AreNotEqual(result, -1);
            ProductCuttingInfo ProductCutting = BLProductCutting.ReadProductCutting(result, ref errors);

            AsynchLog.LogNow(errors);

            Assert.AreEqual(ProductCutting.product_cutting_id, result);
            Assert.AreEqual(ProductCutting.product_cutting_name, createString);
        }
Exemplo n.º 3
0
        public void CreateProductCuttingErrorTest()
        {
            List <string> errors         = new List <string>(); // TODO: Initialize to an appropriate value
            List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value

            BLProductCutting.CreateProductCutting(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 iProductCuttingName = "Louis" + rand.Next(1000);

            BLProductCutting.CreateProductCutting(iProductCuttingName, ref errors);
            AsynchLog.LogNow(errors);
            BLProductCutting.CreateProductCutting(iProductCuttingName, ref errors);
            AsynchLog.LogNow(errors);
            Assert.AreEqual(1, errors.Count);
        }
Exemplo n.º 4
0
 public int CreateProductCutting(string ProductCuttingName, ref List <string> errors)
 {
     return(BLProductCutting.CreateProductCutting(ProductCuttingName, ref errors));
 }