Esempio n. 1
0
        public void ParseAxis_WithParameterAndDimensionProperties_SecceedsAndReturnsAxis()
        {
            //ARRANGE
            const string queryString = "NON EMPTY { [Aaa] } DIMENSION PROPERTIES CATALOG_NAME, CUSTOM_ROLLUP ON Columns";

            const string expectedString = "NON EMPTY { [Aaa] } DIMENSION PROPERTIES CATALOG_NAME, CUSTOM_ROLLUP ON Columns";

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

            //ASSERT
            Assert.That(isSucceeded, Is.True);
            Assert.That(expression, Is.InstanceOf <MdxAxis>());
            Assert.That(expression.ToString(), Is.EqualTo(expectedString));
        }
Esempio n. 2
0
        public void ParseAxis_WithParameters_SecceedsAndReturnsAxis()
        {
            //ARRANGE
            const string queryString = "NON EMPTY { [Aaa].[Bbb].[Ccc].FUNCTION(1, 2).FUNCTION, [Aaa] } ON Columns";

            const string expectedString = "NON EMPTY { [Aaa].[Bbb].[Ccc].FUNCTION(1, 2).FUNCTION, [Aaa] } ON Columns";

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

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