public void CircularUpdates_DoNotLoopForever() { int loopCount = 0; ReduxValueSubscription <string, int> subscription = null !; using (subscription = new ReduxValueSubscription <string, int>( s => s.Length, ValueChanged, WhenReleased)) { subscription.Publish("bang"); } void ValueChanged(int _) { loopCount++.Should().BeLessThan(10); subscription.Publish("bang"); } }
public PublishTests() { _subscription = new ReduxValueSubscription <string, int>(Reader, WhenChanged, WhenReleased); }