Example #1
0
            public virtual ExecutionTreeBuilder Id(string id)
            {
                ExecutionTreeStructureAssertion currentAssertion = ActivityInstanceStack.Peek();

                currentAssertion.ExpectedId = id;
                return(this);
            }
Example #2
0
            public virtual ExecutionTreeBuilder NoScope()
            {
                ExecutionTreeStructureAssertion currentAssertion = ActivityInstanceStack.Peek();

                currentAssertion.ExpectedIsScope = false;
                return(this);
            }
Example #3
0
            public virtual ExecutionTreeBuilder Concurrent()
            {
                ExecutionTreeStructureAssertion currentAssertion = ActivityInstanceStack.Peek();

                currentAssertion.ExpectedIsConcurrent = true;
                return(this);
            }
Example #4
0
 public static void Describe(ExecutionTreeStructureAssertion Assertion, string prefix, StringBuilder errorBuilder)
 {
     errorBuilder.Append(prefix);
     errorBuilder.Append(Assertion);
     errorBuilder.Append("\n");
     foreach (ExecutionTreeStructureAssertion child in Assertion.ChildAssertions)
     {
         Describe(child, prefix + "   ", errorBuilder);
     }
 }
Example #5
0
            public virtual ExecutionTreeBuilder Child(string activityId)
            {
                ExecutionTreeStructureAssertion newInstance = new ExecutionTreeStructureAssertion();

                newInstance.ExpectedActivityId = activityId;

                ExecutionTreeStructureAssertion parentInstance = ActivityInstanceStack.Peek();

                parentInstance.AddChildAssertion(newInstance);

                ActivityInstanceStack.Push(newInstance);

                return(this);
            }
Example #6
0
 public virtual void AddChildAssertion(ExecutionTreeStructureAssertion childAssertion)
 {
     this.ChildAssertions.Add(childAssertion);
 }
Example #7
0
 public ExecutionTreeBuilder(string rootActivityInstanceId)
 {
     RootAssertion = new ExecutionTreeStructureAssertion();
     RootAssertion.ExpectedActivityId = rootActivityInstanceId;
     ActivityInstanceStack.Push(RootAssertion);
 }