Exemplo n.º 1
0
        public ActionResult Index(int id)
        {
            try
            {
                if (Convert.ToInt32(TempData["Visited"]) != 1)
                {
                    video.View(id);
                    TempData["visited"] = 1;
                }
                TempData["videoid"] = Convert.ToString(id);
                ViewModel model = new ViewModel();
                model.Video     = video.GetVideo(id);
                model.Reactions = reaction.GetReactionsForVideo(id);


                return(View(model));
            }
            catch (Exception ex)
            {
                return(new EmptyResult());
            }
        }
Exemplo n.º 2
0
 public void GetVideo()
 {
     // Id's should be the same since it looks up the video based on id
     Assert.AreEqual(0, videorepo.GetVideo(0).ID);
 }