Ejemplo n.º 1
0
        public void ToHtmlArrayTest()
        {
            Htmlect html = new Htmlect();
            string  r    = html.ToHtml(a.Search("Deadpool", 1));

            Console.WriteLine(r);
        }
Ejemplo n.º 2
0
        public MovHubModule()
        {
            Get["/movies"] = args =>
            {
                string            title      = this.Request.Query.title;
                MovieSearchItem[] moviesList = movieDb.Search(title, 1);
                MovHubViewModel   model      = new MovHubViewModel(
                    "Movies for title: " + title,
                    html.ToHtml(moviesList));
                return(View["ViewTable", model]);
            };
            Get["/movies/{movieId}"] = args =>
            {
                Movie           mov   = movieDb.MovieDetails(args.movieId);
                MovHubViewModel model = new MovHubViewModel(
                    "Movie Details:",
                    html.ToHtml(mov));
                return(View["ViewDetails", model]);
            };

            Get["/movies/{movieId}/credits"] = args =>
            {
                CreditsItem[]   credits = movieDb.MovieCredits(args.movieId);
                MovHubViewModel model   = new MovHubViewModel(
                    "Cast and Crew:",
                    html.ToHtml(credits));
                return(View["ViewTable", model]);
            };

            Get["/person/{actorId}/movies"] = args =>
            {
                Person            actor      = movieDb.PersonDetais(args.actorId);
                MovieSearchItem[] credits    = movieDb.PersonMovies(args.actorId);
                MovHubViewModel   moviesList = new MovHubViewModel(
                    html.ToHtml(actor),
                    html.ToHtml(credits));
                return(View["ViewTable", moviesList]);
            };
        }
        public void ToHtmlTest()
        {
            Movie  movie    = movieDb.MovieDetails(860);
            String thisHtml = html.ToHtml(movie);

            Assert.IsTrue(
                thisHtml.Contains("<ul class='list-group'><li class='list-group-item'>" +
                                  "<strong>OriginalTitle</strong>:WarGames</li>"));
        }
Ejemplo n.º 4
0
 private static void BenchHtmlect()
 {
     htmlReflectTest.ToHtml(sampleArray);
 }
Ejemplo n.º 5
0
 public void ToHtmlTest()
 {
     Htmlect html = new Htmlect();
     string  r    = html.ToHtml(a.MovieDetails(58));
 }
Ejemplo n.º 6
0
        public void ToHtmlTest()
        {
            string movieHtml = htmlect.ToHtml(movie);

            Assert.AreEqual(expectedMovieHtml, movieHtml);
        }