Exemplo n.º 1
0
        public PeriodicReportFileThread(PeriodicReportFile periodicReportFile, double period_sec)
            : base(1.0 / period_sec, PeriodicThreadTightness.Low)
        {
            ArgAssert.NotNull(periodicReportFile, "periodicReportFile");

            Thread.Priority     = ThreadPriority.Lowest;
            _periodicReportFile = periodicReportFile;
        }
        public void SetUp()
        {
            _dateTimeProvider = new ManualDateTimeProvider();
            _dateTimeProvider.CurrentDateTime = new DateTime(2012, 12, 12, 13, 45, 32, 123, DateTimeKind.Utc).ToUtcAndLocal();

            _fileSystemMock = FileSystemTestUtils.CreateMock();
            _reportFilePath = new FileSystemPath("/foo/bar");

            _periodicReportFile = new PeriodicReportFile(_dateTimeProvider, _fileSystemMock.Object, _reportFilePath);

            _fileSystemMock.SetupWritableFile(_reportFilePath, expected: null, exists: false);
        }