예제 #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!!!");
 }