Ejemplo n.º 1
0
            public void Should_Set_LogFileContent_If_Empty()
            {
                // Given
                byte[] logFileContent = Array.Empty <byte>();
                var    format         = new MarkdownlintLogFileFormat(new FakeLog());

                // When
                var settings = new MarkdownlintIssuesSettings(logFileContent, format);

                // Then
                settings.LogFileContent.ShouldBe(logFileContent);
            }
Ejemplo n.º 2
0
            public void Should_Set_LogFileContent()
            {
                // Given
                var logFileContent = "Foo".ToByteArray();
                var format         = new MarkdownlintLogFileFormat(new FakeLog());

                // When
                var settings = new MarkdownlintIssuesSettings(logFileContent, format);

                // Then
                settings.LogFileContent.ShouldBe(logFileContent);
            }
Ejemplo n.º 3
0
            public void Should_Throw_If_LogFileContent_Is_Null()
            {
                // Given
                byte[] logFileContent = null;
                var    format         = new MarkdownlintLogFileFormat(new FakeLog());

                // When
                var result = Record.Exception(() =>
                                              new MarkdownlintIssuesSettings(logFileContent, format));

                // Then
                result.IsArgumentNullException("logFileContent");
            }
Ejemplo n.º 4
0
            public void Should_Set_LogFileContent_From_LogFilePath()
            {
                // Given
                var format = new MarkdownlintLogFileFormat(new FakeLog());

                using (var tempFile = new ResourceTempFile("Cake.Issues.Markdownlint.Tests.Testfiles.MarkdownlintLogFileFormat.markdownlint.json"))
                {
                    // When
                    var settings = new MarkdownlintIssuesSettings(tempFile.FileName, format);

                    // Then
                    settings.LogFileContent.ShouldBe(tempFile.Content);
                }
            }