public static IEnumerable <TestCaseData> BlockTestTestData() { Random rnd = new Random(); //Создаем массив из перечисления Array values = Enum.GetValues(typeof(BlockingReasonType)); //Вытягиваем рандомно элемент BlockingReasonType randomType = (BlockingReasonType)values.GetValue(rnd.Next(values.Length)); yield return(new TestCaseData(randomType, CustomRequestInt.GetSettingByKey <string>("AccountIdForBlock"), 200)); }
public static void AddParametersToBlockTest(BlockingReasonType randomType) { RequestHelperInt.pRequestBlockUFR .AddParameter("reason", randomType, ParameterType.QueryString); }