Example #1
0
        public override async Task <StatementProofResult> Eval <TArg1, TResult>(
            IStatementMetadata <TArg1, TResult> statement)
        {
            var statementDataGenerator = DataGeneratorFactory.For(statement.Argument1.Predicate);

            for (var i = 0; i < _timesToRun; i++)
            {
                var trueData = await statementDataGenerator.NextTrue();

                if (!await statement.Result.Predicate.Eval(statement.Method(trueData)))
                {
                    return(StatementProofResult.Failed($"Failed on {trueData}."));
                }
            }

            return(StatementProofResult.Successful());
        }