/// <summary> /// Create a parallel node. /// </summary> /// <param name="name">The name.</param> /// <param name="numRequiredToFail">The number required to fail.</param> /// <param name="numRequiredToSucceed">The number required to succeed.</param> /// <returns>MyTreeBuilder</returns> public MyTreeBuilder Parallel(string name, int numRequiredToFail, int numRequiredToSucceed) { var parallelNode = new ParallelNode(name, numRequiredToFail, numRequiredToSucceed); if (parentNodeStack.Count > 0) { parentNodeStack.Peek().AddChild(parallelNode); } parentNodeStack.Push(parallelNode); return(this); }
void Init(int numRequiredToFail = 0, int numRequiredToSucceed = 0) { testObject = new ParallelNode("some-parallel", numRequiredToFail, numRequiredToSucceed); }