public void Success_ListAllUserProducts() { //Arrange int index; int max_index; UserProduct user_product; List <UserProduct> user_products; //Act index = 1; max_index = 51; while (index < max_index) { user_product = new UserProduct { ProductId = products[index].Id, Username = user.Username, IsActive = false }; db_userproduct.CreateUserProduct(user_product); index++; } user_products = db_userproduct.ListAllUserProducts(); //Assert Assert.IsTrue(user_products.Count >= 50); }
/// <summary> /// lists all user products. /// </summary> /// <returns>List<UserProduct></returns> public List <UserProduct> ListAll() { return(db_userproduct.ListAllUserProducts()); }