Exemple #1
0
 /// <summary>
 /// Waits until Regex query is printed on session output and
 /// executes handler
 /// </summary>
 /// <param name="query">expected output in RegEx</param>
 /// <param name="handler">action to be performed</param>
 /// <exception cref="System.TimeoutException">Thrown when query is not find for given
 /// amount of time</exception>
 public void ExpectMatch(string query, ExpectedHandler handler)
 {
     ExpectMatch(query, (s) => handler());
 }
Exemple #2
0
 /// <summary>
 /// Waits until query is printed on session output and
 /// executes handler
 /// </summary>
 /// <param name="query">expected output in RegEx</param>
 /// <param name="handler">action to be performed</param>
 /// <exception cref="System.TimeoutException">Thrown when query is not find for given
 /// amount of time</exception>
 public async Task ExpectMatchAsync(string query, ExpectedHandler handler)
 {
     await ExpectMatchAsync(query, s => handler()).ConfigureAwait(false);
 }
Exemple #3
0
 public async Task ExpectAsync(Regex regex, ExpectedHandler handler)
 {
     await ExpectAsync(new RegexMatcher(regex), s => handler()).ConfigureAwait(false);
 }
Exemple #4
0
        /// <summary>
        /// Timeout value in miliseconds for Expect function
        /// </summary>

        /// <summary>
        /// Waits until query is printed on session output and
        /// executes handler
        /// </summary>
        /// <param name="query">expected output</param>
        /// <param name="handler">action to be performed</param>
        /// <exception cref="System.TimeoutException">Thrown when query is not find for given
        /// amount of time</exception>
        public async Task ExpectAsync(string query, ExpectedHandler handler)
        {
            await ExpectAsync(new StringContainsMatcher(query), s => handler()).ConfigureAwait(false);
        }
Exemple #5
0
 public void Expect(Regex regex, ExpectedHandler handler, Int32 timeout = 0)
 {
     Expect(new RegexMatcher(regex), (s) => handler(), timeout);
 }
Exemple #6
0
 /// <summary>
 /// Waits until query is printed on session output and
 /// executes handler
 /// </summary>
 /// <param name="query">expected output</param>
 /// <param name="handler">action to be performed</param>
 /// <param name="timeout">read time, unit: miliseconds</param>
 /// <exception cref="System.TimeoutException">Thrown when query is not find for given
 /// amount of time</exception>
 public void Expect(string query, ExpectedHandler handler, Int32 timeout = 0)
 {
     Expect(new StringContainsMatcher(query), (s) => handler(), timeout);
 }