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