public void ShouldCreateReportIfProcessingSucceeds()
        {
            var sut = CreateSut();

            _builder.CreateReport(Arg.Any <FileReportModel>()).Returns("Report Data");

            sut.Process(new List <Story>());

            _writer.Received().OutputReport("Report Data", Arg.Any <string>(), Arg.Any <string>());
        }
Exemplo n.º 2
0
        public StatementReport CreateReport()
        {
            StatementReport statementReport    = _reportBuilder.CreateReport(this);
            var             listaExtraseReport = CreateReportBindingList(_listaExtrase);

            statementReport.BindReportData(listaExtraseReport);
            return(statementReport);
        }
Exemplo n.º 3
0
 public static void Approve(Func <FileReportModel> model, IReportBuilder reportBuilder)
 {
     // setting the culture to make sure the date is formatted the same on all machines
     using (new TemporaryCulture("en-GB"))
     {
         var result = reportBuilder.CreateReport(model());
         Approvals.Verify(result, s => Scrub(StackTraceScrubber.ScrubLineNumbers(StackTraceScrubber.ScrubPaths(s))));
     }
 }
Exemplo n.º 4
0
 public static void Approve(FileReportModel model, IReportBuilder reportBuilder)
 {
     // setting the culture to make sure the date is formatted the same on all machines
     using (new TemporaryCulture("en-GB"))
     {
         var result = reportBuilder.CreateReport(model);
         Approvals.Verify(result, s => Scrub(StackTraceScrubber.ScrubLineNumbers(StackTraceScrubber.ScrubPaths(s))));
     }
 }
Exemplo n.º 5
0
 public static void Approve(FileReportModel model, IReportBuilder reportBuilder)
 {
     // setting the culture to make sure the date is formatted the same on all machines
     using (new TemporaryCulture("en-GB"))
     {
         var result = reportBuilder.CreateReport(model);
         result.ShouldMatchApproved(c => c
             .WithScrubber(Scrub)
             .UseCallerLocation());
     }
 }
Exemplo n.º 6
0
 public static void Approve(FileReportModel model, IReportBuilder reportBuilder)
 {
     // setting the culture to make sure the date is formatted the same on all machines
     using (new TemporaryCulture("en-GB"))
     {
         var result = reportBuilder.CreateReport(model);
         result.ShouldMatchApproved(c => c
                                    .WithScrubber(Scrub)
                                    .UseCallerLocation());
     }
 }
Exemplo n.º 7
0
        public void Process(IEnumerable <Story> stories)
        {
            var    viewModel = new FileReportModel(stories.ToReportModel());
            string report;

            try
            {
                report = _builder.CreateReport(viewModel);
            }
            catch (Exception ex)
            {
                report = ex.Message + ex.StackTrace;
            }

            _writer.OutputReport(report, "BDDfy.md");
        }