Ejemplo n.º 1
0
        public static IFile BuildFileFromPath(string filePath, IDiskIOWrapper diskIoWrapper)
        {
            var fileContent = diskIoWrapper.ReadAllLinesFromFile(filePath);

            return(new File(Path.GetFileName(filePath) ?? throw new FileBuilderException(filePath),
                            Path.GetExtension(filePath) !,
                            Path.GetDirectoryName(filePath) !,
                            SourceLineBuilder.BuildSourceLineFromLineOfCode(fileContent.ToArray()),
                            Option <IFileGitStats> .None,
                            Option <IFileCoverageStats> .None));
        }
Ejemplo n.º 2
0
 public StatsEnricher(IDiskIOWrapper ioWrapper,
                      IGitCommands gitCommands,
                      ILogger logger,
                      ICommandLineExecutor executor,
                      ICoverageProviderFactory providerFactory,
                      IPathValidator pathValidator,
                      ICoverageReportConverter converter)
 {
     _ioWrapper       = ioWrapper;
     _gitCommands     = gitCommands;
     _logger          = logger;
     _executor        = executor;
     _providerFactory = providerFactory;
     _pathValidator   = pathValidator;
     _converter       = converter;
 }
 public RepositorySnapshotBuilderArguments(string snapshotId,
                                           string rootPath,
                                           string sourceRoot,
                                           string[] sourceExtensions,
                                           string coveragePath,
                                           Option <string> atHash,
                                           Option <DateTime> commitCreationDate,
                                           IDiskIOWrapper diskIoWrapper,
                                           IPathValidator pathValidator)
 {
     SnapshotId         = snapshotId;
     RootPath           = rootPath;
     SourceRoot         = sourceRoot;
     SourceExtensions   = sourceExtensions;
     CoveragePath       = coveragePath;
     AtHash             = atHash;
     CommitCreationDate = commitCreationDate;
     DiskIoWrapper      = diskIoWrapper;
     PathValidator      = pathValidator;
 }
Ejemplo n.º 4
0
 public Runner(IDiskIOWrapper ioWrapper,
               IPathValidator pathValidator,
               IRepositorySnapshotBuilderWrapper builder,
               IStatsEnricher statsEnricher,
               ICoverageReportConverter converter,
               ILogger log,
               ISnapshotPersistence persistence,
               IProgressBarFactory progressBarFactory,
               ICommandLineExecutor executor,
               ISpinner spinner)
 {
     _ioWrapper          = ioWrapper;
     _pathValidator      = pathValidator;
     _builder            = builder;
     _statsEnricher      = statsEnricher;
     _converter          = converter;
     _log                = log;
     _persistence        = persistence;
     _progressBarFactory = progressBarFactory;
     _executor           = executor;
     _spinner            = spinner;
 }
Ejemplo n.º 5
0
 public JsonCovCoverageProvider(IDiskIOWrapper diskIoWrapper) => _diskIoWrapper = diskIoWrapper;
Ejemplo n.º 6
0
 public CoverageReportConverter(IDiskIOWrapper ioWrapper, IReportGeneratorWrapper reportGeneratorWrapper)
 {
     _ioWrapper = ioWrapper;
     _reportGeneratorWrapper = reportGeneratorWrapper;
 }
Ejemplo n.º 7
0
 public CoverageProviderFactory(IDiskIOWrapper ioWrapper,
                                IXmlFileSerializationWrapper xmlFileSerializationWrapper)
 {
     _ioWrapper = ioWrapper;
     _xmlFileSerializationWrapper = xmlFileSerializationWrapper;
 }