Exemple #1
0
 private bool ExecuteNode(AssertionNode node)
 {
     return(node.Type switch
     {
         AssertionNodeType.Leaf => TestAssertion(node.Expression),
         AssertionNodeType.And => ExecuteAnd(node),
         AssertionNodeType.AndAlso => ExecuteAndAlso(node),
         AssertionNodeType.Or => ExecuteOr(node),
         AssertionNodeType.OrElse => ExecuteOrElse(node),
         _ => throw new InvalidOperationException()
     });
Exemple #2
0
 public AssertionTreeExecutor(AssertionNode root, Exception?assertionException)
 {
     _root = root;
     _assertionException = assertionException;
 }