Ejemplo n.º 1
0
 public JobState(IFileStreamProvider fileStreamProvider, IFileLineCounter fileLineCounter, IFileProcessor fileProcessor, IPercentageCalculator percentageCalculator)
 {
     _fileStreamProvider   = fileStreamProvider;
     _fileLineCounter      = fileLineCounter;
     _fileProcessor        = fileProcessor;
     _percentageCalculator = percentageCalculator;
 }
Ejemplo n.º 2
0
 public DirectoryLineCounter(
     IFileSystemAccess fileSystem,
     IFileLineCounter fileLineCounter)
 {
     _fileSystem      = fileSystem;
     _fileLineCounter = fileLineCounter;
 }
Ejemplo n.º 3
0
        private static DirectoryLineCounter CreateSut(
            IFileSystemAccess fileSystem     = null,
            IFileLineCounter fileLineCounter = null
            )
        {
            fileSystem ??= new FakeFileSystemAccessBuilder().Build();
            fileLineCounter ??= Substitute.For <IFileLineCounter>();

            return(new DirectoryLineCounter(fileSystem, fileLineCounter));
        }
Ejemplo n.º 4
0
 public FakeFileLineCounterBuilder()
 {
     _fake = Substitute.For <IFileLineCounter>();
 }
Ejemplo n.º 5
0
 public static void VerifyCountWasCalledOn(IFileLineCounter fake, string expectedFilePath)
 {
     fake.Received(1).Count(expectedFilePath);
 }