AioNet/AioNet.LinqTest/ExtendedLinqTest.cs

19 lines
493 B
C#

namespace AioNet.LinqTest;
using AioNet.Linq;
public class ExtendedLinqTest
{
[Fact]
public void FindOneCombinationFor3Elements_SubsequenceLength3()
{
var foundCombinations = new[] { 1, 2, 3 }.Combinations(3);
Assert.Single(foundCombinations);
var onlyCombination = foundCombinations.First();
Assert.Contains(1, onlyCombination);
Assert.Contains(2, onlyCombination);
Assert.Contains(3, onlyCombination);
}
}