public void TestUserRecipeInformationInputReturnTrueValid() { //arrange int userId = 1000; string title = "Green bean soup"; string category = "soup"; string directions = "blah blah"; //act bool result = recipeManager.AddNewRecipe(title, category, directions, userId); //assert Assert.AreEqual(true, result); }
private void SubmitButton_Click(object sender, RoutedEventArgs e) { string title = txtTitle.Text; string directions = txtDirections.Text; try { myRecipeManager.AddNewRecipe(title, category, directions, _accessToken.UserID); this.NavigationService.Navigate(new ExpertPages.RecipeDetail(_accessToken, new Recipe(0, title, category, directions, _accessToken.UserID, new DateTime(), 0, DateTime.Now))); txtTitle.Clear(); txtDirections.Clear(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }