public void Should_propagate_new_tracker_factories_to_existing_sink_managers() { var mockTableDataSink1 = new Mock <ITableDataSink>(); provider.Subscribe(mockTableDataSink1.Object); var mockTableDataSink2 = new Mock <ITableDataSink>(); provider.Subscribe(mockTableDataSink2.Object); var tracker = CreateTagger() as IssueTracker; // factory of new tracker is propagated to all existing sink managers mockTableDataSink1.Verify(s => s.AddFactory(tracker.Factory, false)); mockTableDataSink2.Verify(s => s.AddFactory(tracker.Factory, false)); }
private Mock <ITableDataSink> RegisterNewErrorListSink() { // Adds a new error list sink to the tagger provider. // Should be notified when issues change. var newSink = new Mock <ITableDataSink>(); taggerProvider.Subscribe(newSink.Object); return(newSink); }