예제 #1
0
        public void Use_Default_Report_File_Name_If_None_Is_Provided()
        {
            var coverageRunner = new CoverageRunner(_instrumentatorMock, _testRunnerMock, _coverageReportMock);

            coverageRunner.Run("testProjectOutputPath", string.Empty);

            _coverageReportMock.Received(1).Export(Arg.Any <CoverageContext>(),
                                                   Arg.Is <string>(s => s.EndsWith("coverage.xml"))
                                                   );
        }
예제 #2
0
        public void Generate_Report_Once_Tests_Were_Executed()
        {
            var coverageRunner = new CoverageRunner(_instrumentatorMock, _testRunnerMock, _coverageReportMock);

            coverageRunner.Run("testProjectOutputPath", "report.xml");

            Received.InOrder(() =>
            {
                _testRunnerMock.Run(Arg.Any <CoverageContext>(), Arg.Any <string>());
                _coverageReportMock.Export(Arg.Any <CoverageContext>(), Arg.Any <string>());
            });
        }
예제 #3
0
        public void Transform_Assembly_Before_Executing_Tests()
        {
            var coverageRunner = new CoverageRunner(_instrumentatorMock, _testRunnerMock, _coverageReportMock);

            coverageRunner.Run("testProjectOutputPath", "report.xml");

            Received.InOrder(() =>
            {
                _instrumentatorMock.ProcessAssembliesInFolder(Arg.Any <CoverageContext>(), Arg.Any <string>());
                _testRunnerMock.Run(Arg.Any <CoverageContext>(), Arg.Any <string>());
            });
        }