public void ParseAxisParameter_WithSubsequentIdentifiers_SucceedsReturnsAxisParameter() { //ARRANGE const string queryString = "[Aaa].[Bbb].[Ccc].FUNCTION(1, 2).FUNCTION"; const string expectedString = "[Aaa].[Bbb].[Ccc].FUNCTION(1, 2).FUNCTION"; //ACT MdxExpressionBase expression; bool isSucceeded = MdxParser.TryParseMember(_lexer.Tokenize(queryString).GetStatedTwoWayEnumerator(), out expression); //ASSERT Assert.That(isSucceeded, Is.True); Assert.That(expression, Is.InstanceOf <MdxMember>()); Assert.That(expression.ToString(), Is.EqualTo(expectedString)); }
public void ParseMember_WithFunctionAfterValueMember_SuceeedsAndReturnsValueMemberWithFunction() { //ARRANGE const string queryString = "[Dim1 Hierarchy].[Dim1].[Dim1 Key].&[1].AllMembers"; const string expectedString = "[Dim1 Hierarchy].[Dim1].[Dim1 Key].&[1].AllMembers"; //ACT MdxExpressionBase expression; bool isSucceeded = MdxParser.TryParseMember(_lexer.Tokenize(queryString).GetStatedTwoWayEnumerator(), out expression); //ASSERT Assert.That(isSucceeded, Is.True); Assert.That(expression, Is.InstanceOf <MdxMember>()); Assert.That(expression.ToString(), Is.EqualTo(expectedString)); }