// For Search Result Window
        // GET: /Directors/DetailsView/5
        public ActionResult DetailsView(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            Actor actor = db.Actors.All().Include(d => d.Movies).FirstOrDefault(d => d.Id == id);
            if (actor == null)
            {
                return HttpNotFound();
            }

            var model = new ActorDetails()
            {
                FullName = actor.FirstName + " " + actor.LastName,
                Id = actor.Id,
                Age = actor.Age,
                Picture = actor.Picture,
                Movies = actor.Movies.Select(m => new MovieDetails()
                {
                    Title = m.Title,
                    CategoryName = m.Category.Name,
                    DetailsUrl = "/Movies/Details/" + m.Id,
                })
            };

            return PartialView("_ActorDetails", model);
        }
        public void DetailsViewShouldReturnCorrectActor()
        {
            var list = new List<Actor>();

            for (int i = 0; i < 10; i++)
            {
                list.Add(new Actor()
                {
                    Id = i,
                    FirstName = "Pesho",
                    LastName = "Peshev"
                });
            }

            var expected = new ActorDetails()
            {
                 FullName = "Pesho Peshev"
            };

            var movieRepoMock = new Mock<IRepository<Actor>>();
            movieRepoMock.Setup(x => x.All()).Returns(list.AsQueryable());

            var uowMock = new Mock<IUowData>();
            uowMock.Setup(x => x.Actors).Returns(movieRepoMock.Object);

            var controller = new ActorsController(uowMock.Object);

            var viewresult = controller.DetailsView(1) as PartialViewResult;
            Assert.IsNotNull(viewresult, "ViewResult is Null");
            var resModel = viewresult.Model;
            var model = viewresult.Model as ActorDetails;
            Assert.IsNotNull(model, "The model is Null");
            Assert.AreEqual(expected.FullName, model.FullName);
        }