Ejemplo n.º 1
0
        public static AssertionConfiguration GetConfiguration(this int?timeout)
        {
            var exceptionMatcher       = ExceptionMatcher.FromTypes(typeof(WebDriverException), typeof(InvalidOperationException), typeof(PropertyTransformationException));
            var assertionConfiguration = new AssertionConfiguration {
                ExceptionMatcher = exceptionMatcher, Timeout = timeout ?? DefaultTimeout, Interval = 100
            };

            return(assertionConfiguration);
        }
Ejemplo n.º 2
0
        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));
        }