Exemplo n.º 1
0
    public void BlinqShouldEqualLinqValueSequenceThenBy([OrderValues] Order[] sourceArr)
    {
        var sourceNativeArr = new NativeArray <Order>(sourceArr, Allocator.Persistent);
        var source          = sourceNativeArr.ToValueSequence();
        var expected        = ExceptionAndValue(() => Linq.ToArray(Linq.ThenBy(Linq.OrderBy(source, SelectSecond.Invoke), SelectFirst.Invoke)));
        var actual          = ExceptionAndValue(() => Linq.ToArray(Blinq.ThenBy(Blinq.OrderBy(source, SelectSecond), SelectFirst)));

        AssertAreEqual(expected, actual);
        sourceNativeArr.Dispose();
    }