Beispiel #1
0
        public void CreateBrandNullErrorTest()
        {
            List <string> errors         = new List <string>(); // TODO: Initialize to an appropriate value
            List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value

            BLBrand.CreateBrand(null, ref errors);

            Assert.AreEqual(1, errors.Count);
        }
Beispiel #2
0
        public void CreateBrandTest()
        {
            Random rand         = new Random();
            String createString = "Sanrio " + 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         = BLBrand.CreateBrand(createString, ref errors);

            Assert.AreNotEqual(result, -1);

            BrandInfo Brand = BLBrand.ReadBrand(result, ref errors);

            AsynchLog.LogNow(errors);

            Assert.AreEqual(Brand.brand_id, result);
            Assert.AreEqual(Brand.brand_name, createString);
        }
Beispiel #3
0
        public void CreateBrandErrorTest()
        {
            List <string> errors         = new List <string>(); // TODO: Initialize to an appropriate value
            List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value

            BLBrand.CreateBrand(null, ref errors);

            Assert.AreEqual(1, errors.Count);
            AsynchLog.LogNow(errors);

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

            BLBrand.CreateBrand(iBrandName, ref errors);
            BLBrand.CreateBrand(iBrandName, ref errors);
            Assert.AreEqual(1, errors.Count);
            AsynchLog.LogNow(errors);
        }
Beispiel #4
0
 public int CreateBrand(string BrandName, ref List <string> errors)
 {
     return(BLBrand.CreateBrand(BrandName, ref errors));
 }