private void CallStepsWithActualParams(ParamDictionaryBase <object> paramDefinitions, params object[] parameters)
        {
            propertyBasedTestContext.ActualParams = new ActualParamDictionary(
                paramDefinitions.KeyValuePairs.Select((pd, i) => new KeyValuePair <string, object>(pd.Key, parameters[i])));

            foreach (var action in propertyBasedTestContext.StepsToReplay)
            {
                action(GetCurrentExecutionEngine());
            }
        }
        private Property CreateProperty(ParamDictionaryBase <object> paramDefinitions)
        {
            if (paramDefinitions.Count > 3)
            {
                throw new NotSupportedException("Maximum 3 property parameter is allowed!");
            }

            if (paramDefinitions.Count == 0)
            {
                throw new NotSupportedException("At least one input parameter is necessary for property based tesing!");
            }

            var paramDefinitionsList = paramDefinitions.ToArray();
            var paramTypes           = paramDefinitionsList.Select(pd => pd.GetType().GetGenericArguments()[0]).ToArray();

            var paramExpressions = paramTypes.Select(Expression.Parameter).ToArray();

            var genericActionTypes = new[] { typeof(Action), typeof(Action <>), typeof(Action <,>), typeof(Action <, ,>) };
            var actionType         = genericActionTypes[paramDefinitions.Count].MakeGenericType(paramTypes);
            var methodToInvoke     = GetType().GetMethod(nameof(CallStepsWithActualParams), BindingFlags.Instance | BindingFlags.NonPublic, null, new [] { typeof(ParamDictionaryBase <object>), typeof(object[]) }, null);

            var expressionLambdaMethod = FindExpressionLambdaMethod(actionType);

            var callStepsWithActualParamsCall = Expression.Call(Expression.Constant(this), methodToInvoke,
                                                                Expression.Constant(paramDefinitions),
                                                                Expression.NewArrayInit(typeof(object), paramExpressions.Select(pe => Expression.Convert(pe, typeof(object)))));

            var actionExpression    = expressionLambdaMethod.Invoke(null, new object[] { callStepsWithActualParamsCall, paramExpressions });
            var actionCompileMethod = actionExpression.GetType().GetMethod(nameof(Expression <Action> .Compile), new Type[0]);

            var action          = actionCompileMethod.Invoke(actionExpression, null);
            var propForAllMetod = FindForAllMethod(actionType, paramTypes);

            return((Property)propForAllMetod.Invoke(null,
                                                    paramDefinitionsList.Concat(new [] { action }).ToArray()));
        }