-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d4a43b
commit 9d251f5
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
tests/SIL.Machine.Tests/Utils/EnumberableExtensionTests.cs
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,23 @@ | ||
using NUnit.Framework; | ||
|
||
namespace SIL.Machine.Utils; | ||
|
||
[TestFixture] | ||
public class EnumerableExtensionTests | ||
{ | ||
[Test] | ||
public void ZipMany_None() | ||
{ | ||
var seqs = new List<IEnumerable<int>>(); | ||
IEnumerable<int> result = seqs.ZipMany(x => x.Sum()); | ||
Assert.That(result, Is.Empty); | ||
} | ||
|
||
[Test] | ||
public void ZipMany_Two() | ||
{ | ||
var seqs = new List<IEnumerable<int>> { new[] { 1, 2, 3 }, new[] { 4, 5, 6 } }; | ||
IEnumerable<int> result = seqs.ZipMany(x => x.Sum()); | ||
Assert.That(result, Is.EqualTo(new[] { 5, 7, 9 })); | ||
} | ||
} |