public void SetUp()
        {
            _fakeFolderMonitor       = Substitute.For <IMonitor>();
            _fakeMonitorFactory      = Substitute.For <IMonitorFactory>();
            _fakeSubfolderController = Substitute.For <ISubfolderController>();
            _fakeMonitorFactory.CreateFolderMonitor().Returns(_fakeFolderMonitor);

            var configuration = CreateDefaultConfiguration();

            _paths = configuration.Paths;
            Configuration.ConfigurationManager.OverrideConfiguration(configuration, false);

            _uut = new BaseFolderController(_fakeMonitorFactory, _fakeSubfolderController);
        }
Exemple #2
0
 public BaseFolderController(IMonitorFactory monitorFactory, ISubfolderController subfolderController)
 {
     _subfolderController    = subfolderController;
     _folderMonitor          = monitorFactory.CreateFolderMonitor();
     _folderMonitor.Created += HandleNewFolder;
 }