public void DeleteMovieFromBookConnShouldDeleteConnAndReturnBookView()
        {
            Book book = TestUtil.generateBook();

            book.Title         = "Jurassic Park";
            book.OriginalTitle = "Jurassic Park";
            AddMedia(book);

            Movie movie = TestUtil.generateMovie();

            movie.Title         = "Jurassic Park";
            movie.OriginalTitle = "Jurassic Park";
            movie.Book          = book;
            AddMedia(movie);

            MediaController mediaController = new MediaController();

            RedirectToRouteResult result = mediaController.DeleteMovieFromBookConn(book.Id) as RedirectToRouteResult;

            Assert.IsNull(movie.Book);
            Assert.IsNull(book.Movie);
            Assert.IsNotNull(result);
            object bookId;

            Assert.IsTrue(result.RouteValues.TryGetValue("id", out bookId));
            Assert.AreEqual(book.Id, (int)bookId);
        }
        public void DeleteMovieFromBookConnWithNoMovieShouldReturnNotFoundView()
        {
            MediaController mediaController = new MediaController();

            ViewResult result = mediaController.DeleteMovieFromBookConn(-1) as ViewResult;

            Assert.IsNotNull(result);
            Assert.AreEqual("NotFound", result.ViewName);
        }