-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ToChangeSet now emits empty sets too (#916)
Added unit test for use case as well
- Loading branch information
Showing
6 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Collections.ObjectModel; | ||
using System.Reactive; | ||
using DynamicData.Binding; | ||
using FluentAssertions; | ||
using Xunit; | ||
|
||
namespace DynamicData.Tests.Issues | ||
{ | ||
public class EmptyToChangeSetIssue | ||
{ | ||
[Fact] | ||
public void EmptyCollectionToChangeSetBehaviour() | ||
{ | ||
var collection = new ObservableCollection<Unit>(); | ||
|
||
var results = collection.ToObservableChangeSet().AsAggregator(); | ||
results.Messages.Count.Should() | ||
.BeGreaterThan(0, "An empty collection should still have an update, even if empty."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters