BalticAmadeus.FluentMdx.Tests.MdxParserPartsTests.ParseExpression_WithSimpleExpression_SuceeedsAndReturnsExpression C# (CSharp) Method

ParseExpression_WithSimpleExpression_SuceeedsAndReturnsExpression() private method

        public void ParseExpression_WithSimpleExpression_SuceeedsAndReturnsExpression()
        {
            //ARRANGE
            const string queryString = "TRUE AND NOT FALSE";

            const string expectedString = "TRUE AND (NOT (FALSE))";

            //ACT
            MdxExpressionBase expression;
            bool isSucceeded = MdxParser.TryParseExpression(_lexer.Tokenize(queryString).GetStatedTwoWayEnumerator(), out expression);

            //ASSERT
            Assert.That(isSucceeded, Is.True);
            Assert.That(expression, Is.InstanceOf<MdxExpression>());
            Assert.That(expression.ToString(), Is.EqualTo(expectedString));
        }