public void Should_Set_LogContent_From_LogFilePath()
            {
                using (var tempFile = new ResourceTempFile("Cake.Issues.Tests.Testfiles.Build.log"))
                {
                    // When
                    var settings = new IssueProviderSettings(tempFile.FileName);

                    // Then
                    settings.LogFileContent.ShouldBe(tempFile.Content);
                }
            }
            public void Should_Set_If_LogContent_If_Empty()
            {
                // Given
                byte[] logFileContent = Array.Empty <byte>();

                // When
                var settings = new IssueProviderSettings(logFileContent);

                // Then
                settings.LogFileContent.ShouldBe(logFileContent);
            }
            public void Should_Set_LogContent()
            {
                // Given
                var logFileContent = "Foo".ToByteArray();

                // When
                var settings = new IssueProviderSettings(logFileContent);

                // Then
                settings.LogFileContent.ShouldBe(logFileContent);
            }
            public void Should_Set_IssueProviderSettings()
            {
                // Given
                var log      = new FakeLog();
                var settings = new IssueProviderSettings("Foo".ToByteArray());

                // When
                var result = new FakeConfigurableIssueProvider(log, settings);

                // Then
                result.IssueProviderSettings.ShouldBe(settings);
            }
            public void Should_Throw_If_IssueProviderSettings_Are_Null()
            {
                // Given
                var log = new FakeLog();
                IssueProviderSettings settings = null;

                // When
                var result = Record.Exception(() => new FakeConfigurableIssueProvider(log, settings));

                // Then
                result.IsArgumentNullException("issueProviderSettings");
            }
            public void Should_Throw_If_Log_Is_Null()
            {
                // Given
                ICakeLog log      = null;
                var      settings = new IssueProviderSettings("Foo".ToByteArray());

                // When
                var result = Record.Exception(() => new FakeConfigurableIssueProvider(log, settings));

                // Then
                result.IsArgumentNullException("log");
            }