コード例 #1
0
        public void Setup()
        {
            var fileOperationsMock = new Mock <IFileOperations>();

            fileOperationsMock.Setup(x => x.GetData(It.IsAny <string>())).Returns(_records);
            _recordConverter = new RecordConverter(fileOperationsMock.Object);
        }
コード例 #2
0
 protected AbstractService()
 {
     csvParser       = ContainerService.Instance.Resolve <ICsvParser>();
     recordConverter = ContainerService.Instance.Resolve <IRecordConverter>();
     csvWriter       = ContainerService.Instance.Resolve <ICsvFileWriter>();
     fileWriter      = ContainerService.Instance.Resolve <IFileWriter>();
     gzip            = ContainerService.Instance.Resolve <IArchiver>();
     alphabet        = ContainerService.Instance.Resolve <IAlphabet>();
     log             = LogManager.GetLogger("UnitTestLogger");
 }
コード例 #3
0
 protected AbstractIntegrationTest()
 {
     csvParser         = ContainerService.Instance.Resolve <ICsvParser>();
     nhanesCsvParser   = ContainerService.Instance.Resolve <INhanesCsvParser>();
     recordConverter   = ContainerService.Instance.Resolve <IRecordConverter>();
     csvWriter         = ContainerService.Instance.Resolve <ICsvFileWriter>();
     fileWriter        = ContainerService.Instance.Resolve <IFileWriter>();
     gzip              = ContainerService.Instance.Resolve <IArchiver>();
     alphabet          = ContainerService.Instance.Resolve <IAlphabet>();
     checkpointFactory = ContainerService.Instance.Resolve <ICheckpointFactory>();
     log = LogManager.GetLogger("UnitTestLogger");
 }
コード例 #4
0
 protected AbstractUtilsTest()
 {
     csvParser         = ContainerService.Instance.Resolve <ICsvParser>();
     recordConverter   = ContainerService.Instance.Resolve <IRecordConverter>();
     csvWriter         = ContainerService.Instance.Resolve <ICsvFileWriter>();
     fileWriter        = ContainerService.Instance.Resolve <IFileWriter>();
     gzip              = ContainerService.Instance.Resolve <IArchiver>();
     alphabet          = ContainerService.Instance.Resolve <IAlphabet>();
     checkpointFactory = ContainerService.Instance.Resolve <ICheckpointFactory>();
     binaryConverter   = ContainerService.Instance.Resolve <IBinaryConverter>();
     rndEventGenerator = ContainerService.Instance.Resolve <IRandomEventGenerator>();
     rndBitGenerator   = ContainerService.Instance.Resolve <IRandomBitGenerator>();
     binaryFileWriter  = ContainerService.Instance.Resolve <IBinaryFileWriter>();
 }
コード例 #5
0
 public SaveRecordManager SetRecordConverter(IRecordConverter converter)
 {
     this.converter = converter;
     return(this);
 }
コード例 #6
0
 public Executor(IRecordConverter recordConverter, INetPositionFile netPositionFile, IBoxedPositionFile boxedPositionFile)
 {
     _recordConverter   = recordConverter;
     _netPositionFile   = netPositionFile;
     _boxedPositionFile = boxedPositionFile;
 }