Beispiel #1
0
            public void Should_Throw_If_Output_File_Is_Null()
            {
                // Given
                var fixture = new DotCoverReporterFixture();

                fixture.OutputFile = null;

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsArgumentNullException(result, "outputFile");
            }
Beispiel #2
0
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                var fixture = new DotCoverReporterFixture();

                fixture.Settings = null;

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsArgumentNullException(result, "settings");
            }
Beispiel #3
0
            public void Should_Append_ConfigurationFile()
            {
                // Given
                var fixture = new DotCoverReporterFixture();

                fixture.Settings.WithConfigFile(new FilePath("./config.xml"));

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("Report \"/Working/config.xml\" " +
                             "/Source=\"/Working/result.dcvr\" " +
                             "/Output=\"/Working/result.xml\"", result.Args);
            }
Beispiel #4
0
            public void Should_Append_LogFile()
            {
                // Given
                var fixture = new DotCoverReporterFixture();

                fixture.Settings.LogFile = "./logfile.log";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("Report " +
                             "/Source=\"/Working/result.dcvr\" " +
                             "/Output=\"/Working/result.xml\" " +
                             "/LogFile=\"/Working/logfile.log\"", result.Args);
            }
Beispiel #5
0
            public void Should_Append_ReportType(DotCoverReportType reportType, string reportTypeString)
            {
                // Given
                var fixture = new DotCoverReporterFixture();

                fixture.Settings.ReportType = reportType;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("Report " +
                             "/Source=\"/Working/result.dcvr\" " +
                             "/Output=\"/Working/result.xml\" " +
                             "/ReportType=" + reportTypeString, result.Args);
            }