@Test void canConstruct() { Assertions.assertThat(this.properties.isEnabled()).isEqualTo(JobsActiveLimitProperties.DEFAULT_ENABLED); Assertions.assertThat(this.properties.getCount()).isEqualTo(JobsActiveLimitProperties.DEFAULT_COUNT); Assertions .assertThat(this.properties.getUserLimit("SomeUser")) .isEqualTo(JobsActiveLimitProperties.DEFAULT_COUNT); }
public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; }
JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; } }
JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; }  }
JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; }  int getUserLimit(final String user); @Override void setEnvironment(final Environment environment); }
JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; }  int getUserLimit(final String user); @Override void setEnvironment(final Environment environment); static final String PROPERTY_PREFIX; static final String ENABLED_PROPERTY; static final String USER_LIMIT_OVERRIDE_PROPERTY_PREFIX; static final boolean DEFAULT_ENABLED; static final int DEFAULT_COUNT; }