Baseline.Testing.Reflection.ArrayIndexerTester.ExpressionCreationWithValueType C# (CSharp) Method

ExpressionCreationWithValueType() private method

private ExpressionCreationWithValueType ( ) : void
return void
        public void ExpressionCreationWithValueType()
        {
            var accessor = ReflectionHelper.GetAccessor<DateTime[]>(x => x[1]);

            var target = new[] { new DateTime(2015, 01, 01), new DateTime(2015, 01, 02) };
            accessor.ToExpression<DateTime[]>().Compile()(target).ShouldBe(target[1]);
        }