@Test public void shouldAnalyzeSettingsNotFoundException() { QuickFixJAutoConfigFailureAnalyzer analyzer = new QuickFixJAutoConfigFailureAnalyzer(); SettingsNotFoundException exception = new SettingsNotFoundException("Error", new RuntimeException(new RuntimeException("Error message"))); FailureAnalysis analyze = analyzer.analyze(null, exception); assertThat(analyze.getAction()).contains("Please provide a QuickFIX/J settings file"); assertThat(analyze.getDescription()).contains("The QuickFIX/J settings file could not be found: Error message"); assertThat(analyze.getCause()).isEqualTo(exception); }
@Override protected FailureAnalysis analyze(Throwable rootFailure, QuickFixJBaseException cause) { String descriptionMessage = cause.getMessage(); String actionMessage = cause.getMessage(); String rootCauseMessage = getRootCauseMessage(cause); if (cause instanceof ConfigurationException) { descriptionMessage = "A configuration error has been detected in the QuickFIX/J settings provided: " + rootCauseMessage; actionMessage = "Please configure your QuickFIX/J settings as per the documentation: https: } if (cause instanceof SettingsNotFoundException) { descriptionMessage = "The QuickFIX/J settings file could not be found: " + rootCauseMessage; actionMessage = "Please provide a QuickFIX/J settings file on the property 'config' for the client/server section in your configuration file."; } return new FailureAnalysis(descriptionMessage, actionMessage, cause); }
QuickFixJAutoConfigFailureAnalyzer extends AbstractFailureAnalyzer<QuickFixJBaseException> { @Override protected FailureAnalysis analyze(Throwable rootFailure, QuickFixJBaseException cause) { String descriptionMessage = cause.getMessage(); String actionMessage = cause.getMessage(); String rootCauseMessage = getRootCauseMessage(cause); if (cause instanceof ConfigurationException) { descriptionMessage = "A configuration error has been detected in the QuickFIX/J settings provided: " + rootCauseMessage; actionMessage = "Please configure your QuickFIX/J settings as per the documentation: https: } if (cause instanceof SettingsNotFoundException) { descriptionMessage = "The QuickFIX/J settings file could not be found: " + rootCauseMessage; actionMessage = "Please provide a QuickFIX/J settings file on the property 'config' for the client/server section in your configuration file."; } return new FailureAnalysis(descriptionMessage, actionMessage, cause); } }
QuickFixJAutoConfigFailureAnalyzer extends AbstractFailureAnalyzer<QuickFixJBaseException> { @Override protected FailureAnalysis analyze(Throwable rootFailure, QuickFixJBaseException cause) { String descriptionMessage = cause.getMessage(); String actionMessage = cause.getMessage(); String rootCauseMessage = getRootCauseMessage(cause); if (cause instanceof ConfigurationException) { descriptionMessage = "A configuration error has been detected in the QuickFIX/J settings provided: " + rootCauseMessage; actionMessage = "Please configure your QuickFIX/J settings as per the documentation: https: } if (cause instanceof SettingsNotFoundException) { descriptionMessage = "The QuickFIX/J settings file could not be found: " + rootCauseMessage; actionMessage = "Please provide a QuickFIX/J settings file on the property 'config' for the client/server section in your configuration file."; } return new FailureAnalysis(descriptionMessage, actionMessage, cause); }  }
QuickFixJAutoConfigFailureAnalyzer extends AbstractFailureAnalyzer<QuickFixJBaseException> { @Override protected FailureAnalysis analyze(Throwable rootFailure, QuickFixJBaseException cause) { String descriptionMessage = cause.getMessage(); String actionMessage = cause.getMessage(); String rootCauseMessage = getRootCauseMessage(cause); if (cause instanceof ConfigurationException) { descriptionMessage = "A configuration error has been detected in the QuickFIX/J settings provided: " + rootCauseMessage; actionMessage = "Please configure your QuickFIX/J settings as per the documentation: https: } if (cause instanceof SettingsNotFoundException) { descriptionMessage = "The QuickFIX/J settings file could not be found: " + rootCauseMessage; actionMessage = "Please provide a QuickFIX/J settings file on the property 'config' for the client/server section in your configuration file."; } return new FailureAnalysis(descriptionMessage, actionMessage, cause); }   }
QuickFixJAutoConfigFailureAnalyzer extends AbstractFailureAnalyzer<QuickFixJBaseException> { @Override protected FailureAnalysis analyze(Throwable rootFailure, QuickFixJBaseException cause) { String descriptionMessage = cause.getMessage(); String actionMessage = cause.getMessage(); String rootCauseMessage = getRootCauseMessage(cause); if (cause instanceof ConfigurationException) { descriptionMessage = "A configuration error has been detected in the QuickFIX/J settings provided: " + rootCauseMessage; actionMessage = "Please configure your QuickFIX/J settings as per the documentation: https: } if (cause instanceof SettingsNotFoundException) { descriptionMessage = "The QuickFIX/J settings file could not be found: " + rootCauseMessage; actionMessage = "Please provide a QuickFIX/J settings file on the property 'config' for the client/server section in your configuration file."; } return new FailureAnalysis(descriptionMessage, actionMessage, cause); }    }