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); }
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); }
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); }
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); }
//[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"); }
public void Initialize() { //New instance of Product Class _productClass = new ProductClass(); }
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"); }