Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented
TestObserver<T>
as a testing utility for aggregating notifications from any arbitrary observable stream.This is something I ended up wanting to support testing for the
ExpireAfter()
operator (the version that operates onISourceCache<TObject, TKey>
andISourceList<T>
directly, and emits sets of removed items, rather than full changesets).I tried using the
ITestingObserver<T>
API fromMicrosoft.Reactive.Testing
first, but I found it way to cumbersome, in the fact that it doesn't actually aggregate notifications to allow easy checking for errors or completions, and it is only usable if you setup ALL your test arrangements and actions to run through aTestScheduler
.I wanted an easy way to:
In other words, I wanted what
ChangeSetAggregator
does.Right now, I just put this in the testing project. I figured it doesn't really belong in the main package, if it's not something that supports DynamicData operators or testing, directly, but I could definitely move it, if anyone thinks it's useful as part of the public API. If so, I'd remove the dependency on
Microsoft.Reactive.Testing.Recorded<T>
.