@Test public void shouldReturnNullFromParseSchemaAttributeTestIfOpenParenthesisIsNotIncluded() { SchemaAttributeTest result = parser.parseSchemaAttributeTest(tokenize("schema-attribute foo")); assertThat(result, is(nullValue())); }
protected SchemaAttributeTest parseSchemaAttributeTest( TokenStream tokens ) { if (tokens.canConsume("schema-attribute", "(")) { NameTest attributeDeclarationName = parseNameTest(tokens); SchemaAttributeTest result = new SchemaAttributeTest(attributeDeclarationName); tokens.consume(")"); return result; } return null; }
XPathParser { protected SchemaAttributeTest parseSchemaAttributeTest( TokenStream tokens ) { if (tokens.canConsume("schema-attribute", "(")) { NameTest attributeDeclarationName = parseNameTest(tokens); SchemaAttributeTest result = new SchemaAttributeTest(attributeDeclarationName); tokens.consume(")"); return result; } return null; } }
XPathParser { protected SchemaAttributeTest parseSchemaAttributeTest( TokenStream tokens ) { if (tokens.canConsume("schema-attribute", "(")) { NameTest attributeDeclarationName = parseNameTest(tokens); SchemaAttributeTest result = new SchemaAttributeTest(attributeDeclarationName); tokens.consume(")"); return result; } return null; } XPathParser( TypeSystem context ); }
XPathParser { protected SchemaAttributeTest parseSchemaAttributeTest( TokenStream tokens ) { if (tokens.canConsume("schema-attribute", "(")) { NameTest attributeDeclarationName = parseNameTest(tokens); SchemaAttributeTest result = new SchemaAttributeTest(attributeDeclarationName); tokens.consume(")"); return result; } return null; } XPathParser( TypeSystem context ); Component parseXPath( String xpath ); }
XPathParser { protected SchemaAttributeTest parseSchemaAttributeTest( TokenStream tokens ) { if (tokens.canConsume("schema-attribute", "(")) { NameTest attributeDeclarationName = parseNameTest(tokens); SchemaAttributeTest result = new SchemaAttributeTest(attributeDeclarationName); tokens.consume(")"); return result; } return null; } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }