예제 #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);
        }
예제 #2
0
 public void Can_wait_for_timeout()
 {
     QTest.QWaitFor(() => { return(false); }, TimeSpan.FromSeconds(1)).Should().BeFalse();
 }
예제 #3
0
        protected bool ExecApplicationWithTimeout(int timeoutMs)
        {
            var testContext = TypeCreator.Create(typeof(TestContext)) as TestContext;

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