Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Oct 11, 2024
1 parent 8d4a43b commit 9d251f5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/SIL.Machine.Tests/Utils/EnumberableExtensionTests.cs
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 }));
}
}

0 comments on commit 9d251f5

Please sign in to comment.