public void Subscribes_on_construction_and_unsubscribes_on_Dispose() { ProcessEventsImpl parent = new ProcessEventsImpl(); ProcessTracker tracker = new ProcessTracker(parent); Assert.Equal(1, parent.ProcessStartedSubscriberCount); Assert.Equal(1, parent.ProcessStoppedSubscriberCount); tracker.Dispose(); Assert.Equal(0, parent.ProcessStartedSubscriberCount); Assert.Equal(0, parent.ProcessStoppedSubscriberCount); }
protected override void FreeManagedResources() { _processTracker.Dispose(); }