[TestMethod] //Deck UpdateDeck(Deck updatedDeck) public void UpdateDeckShouldReturnUpdatedDeck() { // Get new ID testDeck.Name = "updated name"; testDeck.Description = "updated description"; Deck result = dal.UpdateDeck(testDeck); Assert.AreEqual("updated name", result.Name); Assert.AreEqual("updated description", result.Description); }
public IActionResult EditDeck(Deck updatedDeck) { if (decksSqlDAL.UpdateDeck(updatedDeck) == null) { return(View("Error")); } else { return(RedirectToAction("ViewDeck", new { deckId = updatedDeck.Id })); } }