Exemple #1
0
 public void TagsAreReportedInMarkdownReport()
 {
     var reportModel = this.CreateReportModel();
     var model = new FileReportModel(reportModel);
     var sut = new MarkDownReportBuilder();
     ReportApprover.Approve(model, sut);
 }
 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))));
     }
 }
        public void ShouldSerializeDiagnosticDataToSpecifiedFormat()
        {
            var serializer = Substitute.For<ISerializer>();
            var testData = new ReportTestData().CreateTwoStoriesEachWithTwoScenariosWithThreeStepsOfFiveMilliseconds();
            var model = new FileReportModel(testData);
            var sut = new DiagnosticsReportBuilder(serializer);

            sut.CreateReport(model);
            
            serializer.Received().Serialize(Arg.Any<object>());
        }
 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());
     }
 }
        public void ShouldProduceExpectedMarkdownWithExamples()
        {
            var model = 
                new FileReportModel(new ReportTestData().CreateTwoStoriesEachWithOneFailingScenarioAndOnePassingScenarioWithThreeStepsOfFiveMillisecondsAndEachHasTwoExamples()
                    .ToReportModel())
                {
                    RunDate = new DateTime(2014, 3, 25, 11, 30, 5)
                };

            var sut = new MarkDownReportBuilder();
            ReportApprover.Approve(model, sut);
        }
 public void ShouldProduceExpectedMarkdown()
 {
     var model = new FileReportModel(new ReportTestData().CreateMixContainingEachTypeOfOutcome().ToReportModel());
     var sut = new MarkDownReportBuilder();
     ReportApprover.Approve(model, sut);
 }