コード例 #1
0
 public JobState(IFileStreamProvider fileStreamProvider, IFileLineCounter fileLineCounter, IFileProcessor fileProcessor, IPercentageCalculator percentageCalculator)
 {
     _fileStreamProvider   = fileStreamProvider;
     _fileLineCounter      = fileLineCounter;
     _fileProcessor        = fileProcessor;
     _percentageCalculator = percentageCalculator;
 }
コード例 #2
0
 public DirectoryLineCounter(
     IFileSystemAccess fileSystem,
     IFileLineCounter fileLineCounter)
 {
     _fileSystem      = fileSystem;
     _fileLineCounter = fileLineCounter;
 }
コード例 #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));
        }
コード例 #4
0
 public FakeFileLineCounterBuilder()
 {
     _fake = Substitute.For <IFileLineCounter>();
 }
コード例 #5
0
 public static void VerifyCountWasCalledOn(IFileLineCounter fake, string expectedFilePath)
 {
     fake.Received(1).Count(expectedFilePath);
 }