@Test public void needsAdditionalConfigurationTest() { NeedsHistoryAutoConfigurationCondition condition = spy(new NeedsHistoryAutoConfigurationCondition()); ConditionContext context = mock(ConditionContext.class); Environment environment = mock(Environment.class); when(context.getEnvironment()).thenReturn(environment); when(environment.getProperty("camunda.bpm.history-level")).thenReturn(NeedsHistoryAutoConfigurationCondition.HISTORY_AUTO); when(condition.isHistoryAutoSupported()).thenReturn(false); assertTrue(condition.needsAdditionalConfiguration(context)); }
protected boolean needsAdditionalConfiguration(ConditionContext context) { String historyLevel = context.getEnvironment().getProperty("camunda.bpm.history-level"); if (HISTORY_AUTO.equals(historyLevel)) { return !isHistoryAutoSupported(); } return false; }
NeedsHistoryAutoConfigurationCondition extends SpringBootCondition { protected boolean needsAdditionalConfiguration(ConditionContext context) { String historyLevel = context.getEnvironment().getProperty("camunda.bpm.history-level"); if (HISTORY_AUTO.equals(historyLevel)) { return !isHistoryAutoSupported(); } return false; } }
NeedsHistoryAutoConfigurationCondition extends SpringBootCondition { protected boolean needsAdditionalConfiguration(ConditionContext context) { String historyLevel = context.getEnvironment().getProperty("camunda.bpm.history-level"); if (HISTORY_AUTO.equals(historyLevel)) { return !isHistoryAutoSupported(); } return false; }  }
NeedsHistoryAutoConfigurationCondition extends SpringBootCondition { protected boolean needsAdditionalConfiguration(ConditionContext context) { String historyLevel = context.getEnvironment().getProperty("camunda.bpm.history-level"); if (HISTORY_AUTO.equals(historyLevel)) { return !isHistoryAutoSupported(); } return false; }  @Override ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata); }
NeedsHistoryAutoConfigurationCondition extends SpringBootCondition { protected boolean needsAdditionalConfiguration(ConditionContext context) { String historyLevel = context.getEnvironment().getProperty("camunda.bpm.history-level"); if (HISTORY_AUTO.equals(historyLevel)) { return !isHistoryAutoSupported(); } return false; }  @Override ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata);  }