示例#1
0
        public void CorrectArguementTest(string service_id, string state_code)
        {
            GetAllProducts      g = new GetAllProducts();
            List <ProductClass> p = g.GetProductsByServiceID(service_id, state_code);

            Assert.IsNotEmpty(p, "The list is empty, it was expected to be non-empty!!!");
        }
示例#2
0
        public void NullParameterTest(string n1, string n2)
        {
            GetAllProducts      g = new GetAllProducts();
            List <ProductClass> p = g.GetProductsByServiceID(n1, n2);

            //Assert.IsNotEmpty(p, "The list is empty, it was supposed to be non-empty!!!");
        }
示例#3
0
        public void WrongArguementFormatTest(string service_id, string state_code)
        {
            GetAllProducts      g = new GetAllProducts();
            List <ProductClass> p = g.GetProductsByServiceID(service_id, state_code);

            Assert.IsEmpty(p, "The list is non-empty, it was expected to be empty due to wrong arguement type!!!");
        }
示例#4
0
 public void ListNotEmptyTest()
 {
     int zip = 6;
     string state_cd = "AL";
     GetAllProducts g = new GetAllProducts();
     List<ProductClass> p = g.GetEnterpriseProducts(state_cd,zip);
     Assert.IsNotEmpty(p, "The list is empty, it was supposed to be non-empty!!!");
 }
示例#5
0
 public void FormatExceptionTest()
 {
     string stateCode = "Alabama";
     string zip = "9852ddfd";
     GetAllProducts g = new GetAllProducts();
     ProductClass pc = new ProductClass();
     List<ProductClass> p = g.GetEnterpriseProducts(stateCode,Int32.Parse(zip));
     p.Add(pc);
 }
示例#6
0
 public void FormatExceptionTest()
 {
     string rate = "this is rate!!!";
     GetAllProducts g = new GetAllProducts();
     ProductClass pc=new ProductClass();
     pc.Rate = Convert.ToDecimal(rate);
     List<ProductClass> p = g.GetAllProductsList();
     p.Add(pc);
 }
示例#7
0
        public void Test1()
        {
            int                 a = 10;
            int                 b = 20;
            GetAllProducts      g = new GetAllProducts();
            List <ProductClass> p = g.GetAllProductsList();

            Assert.IsEmpty(p, "The list is empty!!!");
        }
示例#8
0
        public void ListNotEmptyTest()
        {
            int                 zip      = 6;
            string              state_cd = "AL";
            GetAllProducts      g        = new GetAllProducts();
            List <ProductClass> p        = g.GetEnterpriseProducts(state_cd, zip);

            Assert.IsNotEmpty(p, "The list is empty, it was supposed to be non-empty!!!");
        }
示例#9
0
        public void FormatExceptionTest()
        {
            string              stateCode = "Alabama";
            string              zip       = "9852ddfd";
            GetAllProducts      g         = new GetAllProducts();
            ProductClass        pc        = new ProductClass();
            List <ProductClass> p         = g.GetEnterpriseProducts(stateCode, Int32.Parse(zip));

            p.Add(pc);
        }
示例#10
0
        public void ProductsNotEmptyTest()
        {
            GetAllProducts g = new GetAllProducts();
            List<ProductClass> l = g.GetAllProductsList();
            Assert.IsNotEmpty(l, "List is empty! It is expected to be non-empty.");

            //GetAllProducts g = new GetAllProducts();
            //List<ProductClass> p = g.GetAllProductsList();
            //Assert.IsNotEmpty(p, "The list is empty, it was supposed to be non-empty!!!");
        }
示例#11
0
        public void FormatExceptionTest()
        {
            string         rate = "this is rate!!!";
            GetAllProducts g    = new GetAllProducts();
            ProductClass   pc   = new ProductClass();

            pc.Rate = Convert.ToDecimal(rate);
            List <ProductClass> p = g.GetAllProductsList();

            p.Add(pc);
        }
示例#12
0
        public void ProductsNotEmptyTest()
        {
            GetAllProducts      g = new GetAllProducts();
            List <ProductClass> l = g.GetAllProductsList();

            Assert.IsNotEmpty(l, "List is empty! It is expected to be non-empty.");



            //GetAllProducts g = new GetAllProducts();
            //List<ProductClass> p = g.GetAllProductsList();
            //Assert.IsNotEmpty(p, "The list is empty, it was supposed to be non-empty!!!");
        }
示例#13
0
        //[ExpectedException(typeof(FormatException))]
        public void FormatExceptionTest()
        {
            FormatException fe = null;

            try
            {
                string         rate = "A string can't be a rate!";
                GetAllProducts g    = new GetAllProducts();
                ProductClass   pc   = new ProductClass();
                pc.Rate = Convert.ToDecimal(rate);
                List <ProductClass> p = g.GetAllProductsList();
                p.Add(pc);
            }
            catch (FormatException f)
            {
                fe = f;
            }
            Assert.IsNotNull(fe, "Expected to throw Format Exception");
        }
示例#14
0
 public void FormatExceptionTest()
 {
     FormatException fe=null;
     try
     {
         string rate = "A string can't be a rate!";
         GetAllProducts g = new GetAllProducts();
         ProductClass pc = new ProductClass();
         pc.Rate = Convert.ToDecimal(rate);
         List<ProductClass> p = g.GetAllProductsList();
         p.Add(pc);
     }
     catch (FormatException f)
     {
         fe = f;
     }
     Assert.IsNotNull(fe,"Expected to throw Format Exception");
 }
示例#15
0
 public void WrongArguementFormatTest(string service_id, string state_code)
 {
     GetAllProducts g = new GetAllProducts();
     List<ProductClass> p = g.GetProductsByServiceID(service_id, state_code);
     Assert.IsEmpty(p, "The list is non-empty, it was expected to be empty due to wrong arguement type!!!");
 }
示例#16
0
        public void NullParameterTest(string n1,string n2)
        {
            GetAllProducts g = new GetAllProducts();
            List<ProductClass> p = g.GetProductsByServiceID(n1, n2);

            //Assert.IsNotEmpty(p, "The list is empty, it was supposed to be non-empty!!!");
        }
示例#17
0
 public void CorrectArguementTest(string service_id, string state_code)
 {
     GetAllProducts g = new GetAllProducts();
     List<ProductClass> p = g.GetProductsByServiceID(service_id, state_code);
     Assert.IsNotEmpty(p, "The list is empty, it was expected to be non-empty!!!");
 }