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