public void RpnEngine_ValidRpnOperation_Failure() { var rpnEngine = new RpnEngine(); var input = " 1 ! t < _"; var rpnOperators = input.Split(' '); foreach (var rpnOperation in rpnOperators) { var isValidOperation = rpnEngine.ValidRpnOperation(rpnOperation); isValidOperation.Should().BeFalse("Because these are not valid rpn operations."); } }
public void RpnEngine_ValidRpnOperation_Success() { var rpnEngine = new RpnEngine(); var input = "^ * - / +"; var rpnOperators = input.Split(' '); foreach (var rpnOperation in rpnOperators) { var isValidOperation = rpnEngine.ValidRpnOperation(rpnOperation); isValidOperation.Should().BeTrue("Because these are all valid rpn operations."); } }