Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Oct 15, 2024
1 parent 0569d1e commit 4c31e2f
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 4c31e2f

Please sign in to comment.