示例#1
0
 public IActionResult DeleteDeck(int deckId, int routedUserId) //todo userId
 {
     if (decksSqlDAL.DeleteDeck(deckId) == false)
     {
         return(View("Error"));
     }
     else
     {
         return(RedirectToAction("MyDecks", new { userId = routedUserId }));
     }
 }
示例#2
0
 [TestMethod] //bool DeleteDeck(int deckId);
 public void DeleteDeckTest()
 {
     Assert.AreEqual(false, dal.DeleteDeck(testDeckId + 1), "Result should be false because the test card should be the highest Id currently in the database");
     Assert.AreEqual(true, dal.DeleteDeck(testDeckId));
 }