Exemple #1
0
        public ActionResult React(string react)
        {
            int videoid = Convert.ToInt32(TempData["videoid"]);
            int userid  = Convert.ToInt32(Session["LoggedAccountID"]);

            if (react != string.Empty)
            {
                reaction.Insert(react, userid, videoid);
            }
            return(RedirectToAction("Index", new { id = videoid }));
        }
Exemple #2
0
 public void Insert()
 {
     Assert.AreEqual(true, reactionrepo.Insert("testreaction", 0, 0));
     // Check if it was added to the list, list should be 4 then because we added the reaction with video id 0
     Assert.AreEqual(4, reactionrepo.GetReactionsForVideo(0).Count);
 }