public void LeftHandSideExpression_should_match_multiple_static_properties() { var expected = new StaticPropertyExpression( new StaticPropertyExpression( new IdentifierExpression("foo", new SourceRange(1, 3, 1, 1)), "bar", new SourceRange(1, 7, 1, 1) ), "baz", new SourceRange(1, 11, 1, 1) ); var match = EmdGrammar.LeftHandSideExpression.ShouldMatchAllOf( //0....:....0....:....0....:....0....:....0....:....0....:....0 @"@foo.bar.baz"); match.Product.ShouldBeEquivalentTo(expected); }
public void LeftHandSideExpression_should_match_static_property_with_superfluous_whitespace() { var expected = new StaticPropertyExpression( new IdentifierExpression("foo", new SourceRange(1, 3, 1, 1)), "bar", new SourceRange(1,9,1,1) ); var match = EmdGrammar.LeftHandSideExpression.ShouldMatchAllOf("@foo . bar"); match.Product.ShouldBeEquivalentTo(expected); }