public TestHarnessCommand(TestHarnessClassCommandAttribute attribute, ITestCommand inner) : base(inner) { if (!Int32.TryParse(KuduUtils.GetTestSetting(RunsSettingKey), out _runs)) { _runs = attribute.Runs; } _runs = Math.Max(DefaultRuns, _runs); if (!Int32.TryParse(KuduUtils.GetTestSetting(RetriesSettingKey), out _retries)) { _retries = attribute.Retries; } _retries = Math.Max(DefaultRetries, _retries); if (!Boolean.TryParse(KuduUtils.GetTestSetting(SuppressErrorSettingKey), out _suppressError)) { _suppressError = attribute.SuppressError; } }
public TestHarnessCommand(TestHarnessClassCommandAttribute attribute, ITestCommand inner, IMethodInfo testMethod) : base(inner) { _testMethod = testMethod; // prefer imperative over config settings if (attribute.Runs != DefaultRuns || !Int32.TryParse(KuduUtils.GetTestSetting(RunsSettingKey), out _runs)) { _runs = attribute.Runs; } _runs = Math.Max(DefaultRuns, _runs); if (attribute.Retries != DefaultRetries || !Int32.TryParse(KuduUtils.GetTestSetting(RetriesSettingKey), out _retries)) { _retries = attribute.Retries; } _retries = Math.Max(DefaultRetries, _retries); if (attribute.SuppressError != DefaultSuppressError || !Boolean.TryParse(KuduUtils.GetTestSetting(SuppressErrorSettingKey), out _suppressError)) { _suppressError = attribute.SuppressError; } }