コード例 #1
0
 public void BeforeEachTest()
 {
     _manager = new FileMonitorManager(
         Mock.Of <IFileSystemEventPoller>(p => p.DisposeAsync() == Task.FromResult <object>(null)),
         LogManager.GetLogger(typeof(FileMonitorManager))
         );
     _folders = TestFileSystemHelper.CreateAndGetTestFolders();
 }
コード例 #2
0
        public void BeforeEachTest()
        {
            var sharpSvnClient = new SharpSvnClient(new NetworkCredential(), LogFor <SharpSvnClient>());

            _workerWrapper = new TestEventWorkerWrapper(new FileSystemEventWorker(sharpSvnClient, LogFor <FileSystemEventWorker>()), LogFor <TestEventWorkerWrapper>());
            _manager       = new FileMonitorManager(new FileSystemEventPoller(_workerWrapper, LogFor <FileSystemEventPoller>()), LogFor <FileMonitorManager>());

            var repositoryUrl = TestRepositoryHelper.RepositoryUrl;

            TestRepositoryHelper.SetupRepository();

            //Create folders
            _testFolders = TestFileSystemHelper.CreateAndGetTestFolders(repositoryUrl);
            foreach (var folder in _testFolders)
            {
                TestRepositoryHelper.CreateDirectoryInRepository(folder.RepositoryUrl);
                if (!sharpSvnClient.SvnCheckOut(folder.RepositoryUrl, folder.Path))
                {
                    throw new InvalidOperationException("Failed to checkout " + folder.Path + ".");
                }
            }
        }