public TestRequests Retry(RetryTestType retryTestType, Func<string> value, int maxRetries, int interval, Func<WebTestRequest> webApiRequest, params Func<ValidationRule>[] asserts)
{
Contract.Requires(maxRetries >= 0, "The max retries cannot be less than 0.");
Contract.Requires(interval >= 0, "The retry interval cannot be less than 0.");
Contract.Requires(webApiRequest != null, "The web api request cannot be null.");
var testRequest = new TestRequest { Request = webApiRequest, Asserts = asserts, RetryTestType = retryTestType, RetryValueDelegate = value, MaxRetries = maxRetries, Interval = interval };
Requests.Add(testRequest);
return this;
}