@Test( expected = SAXException.class ) public void startParsing_exception_on_missed_formula() throws SAXException { variableReadHandler.startParsing( testAttributes ); }
protected void startParsing( final Attributes attrs ) throws SAXException { this.formula = attrs.getValue( getUri(), "formula" ); if ( formula == null ) { String dataRowName = attrs.getValue( getUri(), "datarow-name" ); if ( dataRowName == null ) { throw new ParseException( "Required attribute 'datarow-name' is not defined" ); } this.formula = '=' + FormulaUtil.quoteReference( dataRowName ); } variableName = attrs.getValue( getUri(), "variable-name" ); if ( variableName == null ) { variableName = attrs.getValue( getUri(), "datarow-name" ); if ( variableName == null ) { throw new ParseException ( "Required attribute 'variable-name' is not defined, and legacy 'data-row' name is also undefined." ); } } }
VariableReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { this.formula = attrs.getValue( getUri(), "formula" ); if ( formula == null ) { String dataRowName = attrs.getValue( getUri(), "datarow-name" ); if ( dataRowName == null ) { throw new ParseException( "Required attribute 'datarow-name' is not defined" ); } this.formula = '=' + FormulaUtil.quoteReference( dataRowName ); } variableName = attrs.getValue( getUri(), "variable-name" ); if ( variableName == null ) { variableName = attrs.getValue( getUri(), "datarow-name" ); if ( variableName == null ) { throw new ParseException ( "Required attribute 'variable-name' is not defined, and legacy 'data-row' name is also undefined." ); } } } }
VariableReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { this.formula = attrs.getValue( getUri(), "formula" ); if ( formula == null ) { String dataRowName = attrs.getValue( getUri(), "datarow-name" ); if ( dataRowName == null ) { throw new ParseException( "Required attribute 'datarow-name' is not defined" ); } this.formula = '=' + FormulaUtil.quoteReference( dataRowName ); } variableName = attrs.getValue( getUri(), "variable-name" ); if ( variableName == null ) { variableName = attrs.getValue( getUri(), "datarow-name" ); if ( variableName == null ) { throw new ParseException ( "Required attribute 'variable-name' is not defined, and legacy 'data-row' name is also undefined." ); } } } VariableReadHandler(); }
VariableReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { this.formula = attrs.getValue( getUri(), "formula" ); if ( formula == null ) { String dataRowName = attrs.getValue( getUri(), "datarow-name" ); if ( dataRowName == null ) { throw new ParseException( "Required attribute 'datarow-name' is not defined" ); } this.formula = '=' + FormulaUtil.quoteReference( dataRowName ); } variableName = attrs.getValue( getUri(), "variable-name" ); if ( variableName == null ) { variableName = attrs.getValue( getUri(), "datarow-name" ); if ( variableName == null ) { throw new ParseException ( "Required attribute 'variable-name' is not defined, and legacy 'data-row' name is also undefined." ); } } } VariableReadHandler(); FormulaParameter getObject(); }
VariableReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { this.formula = attrs.getValue( getUri(), "formula" ); if ( formula == null ) { String dataRowName = attrs.getValue( getUri(), "datarow-name" ); if ( dataRowName == null ) { throw new ParseException( "Required attribute 'datarow-name' is not defined" ); } this.formula = '=' + FormulaUtil.quoteReference( dataRowName ); } variableName = attrs.getValue( getUri(), "variable-name" ); if ( variableName == null ) { variableName = attrs.getValue( getUri(), "datarow-name" ); if ( variableName == null ) { throw new ParseException ( "Required attribute 'variable-name' is not defined, and legacy 'data-row' name is also undefined." ); } } } VariableReadHandler(); FormulaParameter getObject();  }