Ejemplo n.º 1
0
        public void Can_wait_for()
        {
            int counter = 0;

            QTest.QWaitFor(
                () =>
            {
                counter++;
                return(counter == 5);
            }, TimeSpan.FromSeconds(5)).Should().BeTrue();
            counter.Should().Be(5);
        }
Ejemplo n.º 2
0
 public void Can_wait_for_timeout()
 {
     QTest.QWaitFor(() => { return(false); }, TimeSpan.FromSeconds(1)).Should().BeFalse();
 }
Ejemplo n.º 3
0
        protected bool ExecApplicationWithTimeout(int timeoutMs)
        {
            var testContext = TypeCreator.Create(typeof(TestContext)) as TestContext;

            return(QTest.QWaitFor(() => testContext.Quited, timeoutMs));
        }