示例#1
0
        public void WhenInputCorrect_ShouldParse(string input, string expectedResult)
        {
            var whereToParser = new WhereToParser();
            var expression    = whereToParser.Parse(input);
            var result        = expression.Evaluate();

            Assert.Equal(expectedResult, result);
        }
示例#2
0
        public void WhenInputIncorrect_ShouldThrowException(string input)
        {
            var whereToParser = new WhereToParser();

            Assert.Throws <ArgumentException>(() => whereToParser.Parse(input));
        }