@Test public void checkParameterVisibilityInvalidFormulaCheckboxNotSelectedTest(){ checkParameterVisibility( "ABC", "false", true); }
@VisibleForTesting boolean checkParameterVisibility( ParameterDefinitionEntry entry ) { boolean parameterVisibility = true; final String hiddenFormulaStringValue = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ); if ( !StringUtils.isEmpty( hiddenFormulaStringValue ) ) { if ( "true".equals( hiddenFormulaStringValue ) ) { parameterVisibility = false; } else if ( ("false").equals( hiddenFormulaStringValue ) ) { parameterVisibility = true; } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } return parameterVisibility; }
ParameterReportControllerPane extends JPanel { @VisibleForTesting boolean checkParameterVisibility( ParameterDefinitionEntry entry ) { boolean parameterVisibility = true; final String hiddenFormulaStringValue = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ); if ( !StringUtils.isEmpty( hiddenFormulaStringValue ) ) { if ( "true".equals( hiddenFormulaStringValue ) ) { parameterVisibility = false; } else if ( ("false").equals( hiddenFormulaStringValue ) ) { parameterVisibility = true; } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } return parameterVisibility; } }
ParameterReportControllerPane extends JPanel { @VisibleForTesting boolean checkParameterVisibility( ParameterDefinitionEntry entry ) { boolean parameterVisibility = true; final String hiddenFormulaStringValue = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ); if ( !StringUtils.isEmpty( hiddenFormulaStringValue ) ) { if ( "true".equals( hiddenFormulaStringValue ) ) { parameterVisibility = false; } else if ( ("false").equals( hiddenFormulaStringValue ) ) { parameterVisibility = true; } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } return parameterVisibility; } ParameterReportControllerPane(); }
ParameterReportControllerPane extends JPanel { @VisibleForTesting boolean checkParameterVisibility( ParameterDefinitionEntry entry ) { boolean parameterVisibility = true; final String hiddenFormulaStringValue = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ); if ( !StringUtils.isEmpty( hiddenFormulaStringValue ) ) { if ( "true".equals( hiddenFormulaStringValue ) ) { parameterVisibility = false; } else if ( ("false").equals( hiddenFormulaStringValue ) ) { parameterVisibility = true; } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } return parameterVisibility; } ParameterReportControllerPane(); MasterReport getReport(); void setReport( final MasterReport report ); void hideControls(); ReportParameterValues getReportParameterValues(); void addChangeListener( final ChangeListener changeListener ); void removeChangeListener( final ChangeListener changeListener ); void setErrorMessage( final String error ); }
ParameterReportControllerPane extends JPanel { @VisibleForTesting boolean checkParameterVisibility( ParameterDefinitionEntry entry ) { boolean parameterVisibility = true; final String hiddenFormulaStringValue = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ); if ( !StringUtils.isEmpty( hiddenFormulaStringValue ) ) { if ( "true".equals( hiddenFormulaStringValue ) ) { parameterVisibility = false; } else if ( ("false").equals( hiddenFormulaStringValue ) ) { parameterVisibility = true; } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } } else { parameterVisibility = !entry.getParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.HIDDEN, parameterContext ).equals( "true" ); } return parameterVisibility; } ParameterReportControllerPane(); MasterReport getReport(); void setReport( final MasterReport report ); void hideControls(); ReportParameterValues getReportParameterValues(); void addChangeListener( final ChangeListener changeListener ); void removeChangeListener( final ChangeListener changeListener ); void setErrorMessage( final String error ); static final Color ERROR_COLOR; }