Exemplo n.º 1
0
    public void BlinqShouldEqualLinqNativeArrayJoinNativeArray(
        [ValueSource(typeof(JoinAValues), nameof(JoinAValues.Values))] JoinA[] outerArr,
        [ValueSource(typeof(JoinBValues), nameof(JoinBValues.Values))] JoinB[] innerArr
        )
    {
        var outer    = new NativeArray <JoinA>(outerArr, Allocator.Persistent);
        var inner    = new NativeArray <JoinB>(innerArr, Allocator.Persistent);
        var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Join(outer, inner, JoinAKeySelector.Invoke, JoinBKeySelector.Invoke, JointABSelector.Invoke)));
        var actual   = ExceptionAndValue(() => Linq.ToArray(Blinq.Join(outer, inner, JoinAKeySelector, JoinBKeySelector, JointABSelector)));

        AssertAreEqual(expected, actual);
        outer.Dispose();
        inner.Dispose();
    }