Skip to content

[Feature]: Inspect sorted items through SortedChangeSetAggregator #820

@JakenVeina

Description

@JakenVeina

There is currently no way to test for sorting when using .AsAggregator() upon an ISortedChangeSet<TObject, TKey> stream.

Soemthing along the lines of...

using var source = new SourceCache<int, int>(x => x);

using var results = source
    .Sort(Comparer<int>.Default)
    .AsAggregator();
    
source.AddOrUpdate(3);
source.AddOrUpdate(2);
source.AddOrUpdate(1);

results.SortedItems.Should().BeEquivalentTo(new[] { 1, 2, 3 }, options => options.WithStrictOrdering());

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions