public Session(IExpectable expectable) { Expectable = expectable; }
public static Session Spawn(IExpectable expectable) { expectable.Start(); return(new Session(expectable)); }
public Session(IExpectable expectable) { _timeout = _defaultTimeout; _expectable = expectable; }
public ActionContext(IExpectable expectable, ItemsCache itemsCache) { Expectable = expectable ?? throw new ArgumentNullException(nameof(expectable)); ItemsCache = itemsCache ?? throw new ArgumentNullException(nameof(itemsCache)); }
/// <summary> /// Reads in synchronous way from both standard input and standard error streams. /// </summary> /// <returns>text read from streams</returns> public static string Read(this IExpectable expectable) { var task = Task.Run(async() => await expectable.ReadAsync().ConfigureAwait(false)); return(task.Result); }