public void EmitArrayBodyTest()
        {
            Movie  movie    = movieDb.MovieDetails(860);
            String thisHtml = HtmlEmit.GetArrayBody(movie);

            Assert.IsTrue(
                thisHtml.Contains("<ul class='list-group'><li class='list-group-item'>" +
                                  "<strong>OriginalTitle</strong>:WarGames</li>"));
        }
Пример #2
0
        public void HtmlFormatterForSequenceOfTest()
        {
            HtmlEmit htmlEmit = htmlectEmit.ForSequenceOf <MovieSearchItem>(movies =>
            {
                string movieLine = movies.Aggregate("", (prev, mov) => prev + "<li>" + mov.Id + "</li>");
                return("<h1>Movie ids</h1><ul>" + movieLine + "</h1>");
            });
            string result = htmlEmit.ToHtml(movies);

            result = Regex.Replace(result, @"\t|\n|\r", "");
            Assert.AreEqual(expectedForSequenceOf, result);
        }