@Test public void testLocalAuthorizationRepoService() { LocalAuthorizationRepoServiceCondition condition = new LocalAuthorizationRepoServiceCondition(); System.getProperties().remove(PROPERTY_KEY); assertFalse(condition.matches(null, null)); System.setProperty(PROPERTY_KEY, "false"); assertFalse(condition.matches(null, null)); System.setProperty(PROPERTY_KEY, "true"); assertTrue(condition.matches(null, null)); }
@Override public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { String localAuthorization = System.getProperty("local_authorization"); if (Boolean.valueOf(localAuthorization)) { return Boolean.TRUE; } return Boolean.FALSE; }
LocalAuthorizationRepoServiceCondition implements Condition { @Override public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { String localAuthorization = System.getProperty("local_authorization"); if (Boolean.valueOf(localAuthorization)) { return Boolean.TRUE; } return Boolean.FALSE; } }
LocalAuthorizationRepoServiceCondition implements Condition { @Override public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { String localAuthorization = System.getProperty("local_authorization"); if (Boolean.valueOf(localAuthorization)) { return Boolean.TRUE; } return Boolean.FALSE; }  }
LocalAuthorizationRepoServiceCondition implements Condition { @Override public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { String localAuthorization = System.getProperty("local_authorization"); if (Boolean.valueOf(localAuthorization)) { return Boolean.TRUE; } return Boolean.FALSE; }  @Override boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata); }
LocalAuthorizationRepoServiceCondition implements Condition { @Override public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { String localAuthorization = System.getProperty("local_authorization"); if (Boolean.valueOf(localAuthorization)) { return Boolean.TRUE; } return Boolean.FALSE; }  @Override boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata);  }