public static AssertionConfiguration GetConfiguration(this int?timeout) { var exceptionMatcher = ExceptionMatcher.FromTypes(typeof(ElementNotFoundException), typeof(WebDriverException), typeof(InvalidOperationException), typeof(PropertyTransformationException)); return(new AssertionConfiguration { ExceptionMatcher = exceptionMatcher, Timeout = timeout ?? DefaultTimeout, Interval = 100 }); }
public static IAssertionResult <T, TSource> That <T, TSource>(this IValueProvider <T, TSource> provider, IResolveConstraint constraint) { var configuration = new AssertionConfiguration <T> { Timeout = 2000, Interval = 100, Assertion = Assertion.FromDelegate <T>(x => NUnit.Framework.Assert.That(x, new ReusableConstraint(constraint))), ExceptionMatcher = ExceptionMatcher.FromTypes(typeof(WebDriverException), typeof(InvalidOperationException), typeof(ElementNotFoundException)) }; return(Kontur.RetryableAssertions.Wait.Assertion(provider, configuration)); }