public void Success_ListAllProducts() { //Arrange int index; Product product; List <Product> result; //Act index = 1; while (index < 500) { product = new Product { Name = "ClassLibrary1 - Test product database - ListAllProducts", Price = product_price + index }; db_product.CreateProduct(product); index++; } result = db_product.ListAllProducts(); //Assert Assert.IsTrue(result.Count >= 500, result[0].Name); }
/// <summary> /// List all products. /// </summary> /// <returns>List<Product></returns> public List <Product> ListAll() { return(db_product.ListAllProducts()); }