public GenericIssueReportFixture(string templateContent)
 {
     this.Log = new FakeLog {
         Verbosity = Verbosity.Normal
     };
     this.GenericIssueReportFormatSettings =
         GenericIssueReportFormatSettings.FromContent(templateContent);
 }
Beispiel #2
0
            public void Should_Throw_If_Log_Is_Null()
            {
                // Given / When
                var result = Record.Exception(() =>
                                              new GenericIssueReportGenerator(
                                                  null,
                                                  GenericIssueReportFormatSettings.FromContent("Foo")));

                // Then
                result.IsArgumentNullException("log");
            }
            public void Should_Set_Template()
            {
                // Given
                var templateContent = "foo";

                // When
                var settings = GenericIssueReportFormatSettings.FromContent(templateContent);

                // Then
                settings.Template.ShouldBe(templateContent);
            }
            public void Should_Throw_If_TemplateContent_Is_WhiteSpace()
            {
                // Given
                var templateContent = " ";

                // When
                var result = Record.Exception(() =>
                                              GenericIssueReportFormatSettings.FromContent(templateContent));

                // Then
                result.IsArgumentOutOfRangeException("templateContent");
            }
            public void Should_Throw_If_TemplateContent_Is_Null()
            {
                // Given
                string templateContent = null;

                // When
                var result = Record.Exception(() =>
                                              GenericIssueReportFormatSettings.FromContent(templateContent));

                // Then
                result.IsArgumentNullException("templateContent");
            }
            public void Should_Add_Option()
            {
                // Given
                var key      = HtmlDxDataGridOption.Title;
                var value    = "Bar";
                var settings = GenericIssueReportFormatSettings.FromContent("Foo");

                // When
                var result = settings.WithOption(key, value);

                // Then
                result.Options.Count.ShouldBe(1);
                result.Options.ShouldContainKeyAndValue(key.ToString(), value);
            }