Beispiel #1
0
        public void Should_Generate_String()
        {
            var path = GetPath("templates\\template-1.html");

            var htmlString = File.ReadAllText(path);

            var reporterExecution = new ReporterExecution();
            var inputData         = new
            {
                Name = "Ronaldo Nogueira"
            };
            var result = reporterExecution.GenerateReport(htmlString, inputData);


            Assert.True(!string.IsNullOrEmpty(result));
        }
Beispiel #2
0
        public void Should_Do_ForEach()
        {
            var path = GetPath("templates\\template-2.html");

            var htmlString = File.ReadAllText(path);

            var reporterExecution = new ReporterExecution();
            var inputData         = new
            {
                Ronaldos = new[] { new { Name = "Ronaldo 1" }, new { Name = "Ronaldo 2" } }
            };

            var result = reporterExecution.GenerateReport(htmlString, inputData);


            Assert.True(!string.IsNullOrEmpty(result));
        }