public void Success_FindUserProductByIsActive() { //Arrange int index; UserProduct user_product; UserProduct result; //Act index = 55; user_product = new UserProduct { ProductId = products[index].Id, Username = user.Username, IsActive = true }; db_userproduct.CreateUserProduct(user_product); result = db_userproduct.FindUserProductByIsActive(user.Username, true)[0]; //Assert Assert.AreEqual(user_product.IsActive, result.IsActive); }
/// <summary> /// Finds a list of user_products by their is_active. /// </summary> /// <param name="username"></param> /// <param name="is_active"></param> /// <returns>List<UserProduct></returns> public List <UserProduct> FindByIsActive(string username, bool is_active) { return(db_userproduct.FindUserProductByIsActive(username, is_active)); }