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() });
public AssertionTreeExecutor(AssertionNode root, Exception?assertionException) { _root = root; _assertionException = assertionException; }