public PathContext( DiagnosticMessages diagnosticMessages, FileSystemWatcher watcher, ApplicationEventsPresenter applicationEventsPresenter, PathStates pathStates) { _diagnosticMessages = diagnosticMessages; _watcher = watcher; _applicationEventsPresenter = applicationEventsPresenter; _pathStates = pathStates; _currentState = _pathStates.PathNotDetectedState(); }
public UseCases Compose( ApplicationEventsPresenter applicationEventsPresenter, DiagnosticMessages diagnosticMessages) { _watcher = FileSystemWatchers(); var applicationUseCases = Synchronized( ApplicationUseCases(diagnosticMessages, PathOperationsContext( applicationEventsPresenter, diagnosticMessages))); _watcher.ReportChangesTo(FilteredWith(_filters, applicationUseCases)); return(applicationUseCases); }
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 PathDetectedState(ChangedPath fullPath, SystemServices systemServices, ApplicationEventsPresenter applicationEventsPresenter) { _fullPath = fullPath; _systemServices = systemServices; _applicationEventsPresenter = applicationEventsPresenter; }
public FakeMonitoredPath(ApplicationEventsPresenter presenter, ManuallyTriggerableFileSystemWatcher handControlledFileSystemWatcher) { _presenter = presenter; _handControlledFileSystemWatcher = handControlledFileSystemWatcher; }
public ConcretePathStates(SystemServices systemServices, DiagnosticMessages diagnosticMessages, ApplicationEventsPresenter applicationEventsPresenter) { _systemServices = systemServices; _diagnosticMessages = diagnosticMessages; _applicationEventsPresenter = applicationEventsPresenter; }
public FakeLastDetectedPathChange(ApplicationEventsPresenter presenter) { _presenter = presenter; }
private PathContext PathOperationsContext(ApplicationEventsPresenter applicationEventsPresenter, DiagnosticMessages diagnosticMessages) { return(new PathContext(diagnosticMessages, _watcher, applicationEventsPresenter, new ConcretePathStates(_systemServices, diagnosticMessages, applicationEventsPresenter))); }