示例#1
0
        public ArtifactNotificationDriver StartApplication()
        {
            var watchersFactory = Substitute.For <FileSystemWatcherFactory>();

            _presenter          = Substitute.For <ApplicationEventsPresenter>();
            _diagnosticMessages = Substitute.For <DiagnosticMessages>();
            _systemServices     = Substitute.For <SystemServices>();
            _handControlledFileSystemWatcher = new ManuallyTriggerableFileSystemWatcher();

            watchersFactory.CreateFileSystemWatchers(_filters).Returns(_handControlledFileSystemWatcher);

            var compositionRoot = new CompositionRoot(watchersFactory, _systemServices, _filters);

            _useCases = compositionRoot.Compose(_presenter, _diagnosticMessages);
            _useCases.Initialize();
            return(this);
        }
 public FakeFileSystem(SystemServices systemServices, ManuallyTriggerableFileSystemWatcher handControlledFileSystemWatcher)
 {
     _systemServices = systemServices;
     _handControlledFileSystemWatcher = handControlledFileSystemWatcher;
 }
 public FakeMonitoredPath(ApplicationEventsPresenter presenter, ManuallyTriggerableFileSystemWatcher handControlledFileSystemWatcher)
 {
     _presenter = presenter;
     _handControlledFileSystemWatcher = handControlledFileSystemWatcher;
 }