@Test public void testGetResourceOutcomeForSystemPropertyNotSet() { QuickFixJConfigResourceCondition resourceCondition = new ClientConfigAvailableCondition("any"); ConditionContext context = mock(ConditionContext.class); AnnotatedTypeMetadata metadata = mock(AnnotatedTypeMetadata.class); ConditionOutcome conditionOutcome = resourceCondition.getResourceOutcome(context, metadata); assertThat(conditionOutcome).isNotNull(); assertThat(conditionOutcome.getMessage()).contains("ResourceCondition (quickfixj.client) did not find resource"); }
@Override protected ConditionOutcome getResourceOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { if (System.getProperty(configSystemProperty) != null) { return ConditionOutcome.match(startConditionMessage() .because("System property '" + configSystemProperty + "' is set.")); } return super.getResourceOutcome(context, metadata); }
QuickFixJConfigResourceCondition extends ResourceCondition { @Override protected ConditionOutcome getResourceOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { if (System.getProperty(configSystemProperty) != null) { return ConditionOutcome.match(startConditionMessage() .because("System property '" + configSystemProperty + "' is set.")); } return super.getResourceOutcome(context, metadata); } }
QuickFixJConfigResourceCondition extends ResourceCondition { @Override protected ConditionOutcome getResourceOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { if (System.getProperty(configSystemProperty) != null) { return ConditionOutcome.match(startConditionMessage() .because("System property '" + configSystemProperty + "' is set.")); } return super.getResourceOutcome(context, metadata); } QuickFixJConfigResourceCondition(String configSystemProperty, String prefix, String propertyName, String... resourceLocations); }
QuickFixJConfigResourceCondition extends ResourceCondition { @Override protected ConditionOutcome getResourceOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { if (System.getProperty(configSystemProperty) != null) { return ConditionOutcome.match(startConditionMessage() .because("System property '" + configSystemProperty + "' is set.")); } return super.getResourceOutcome(context, metadata); } QuickFixJConfigResourceCondition(String configSystemProperty, String prefix, String propertyName, String... resourceLocations);  }
QuickFixJConfigResourceCondition extends ResourceCondition { @Override protected ConditionOutcome getResourceOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { if (System.getProperty(configSystemProperty) != null) { return ConditionOutcome.match(startConditionMessage() .because("System property '" + configSystemProperty + "' is set.")); } return super.getResourceOutcome(context, metadata); } QuickFixJConfigResourceCondition(String configSystemProperty, String prefix, String propertyName, String... resourceLocations);   }