@Test
 public void testDefault() {
   WSLoader loader =
       underTest.provide(
           mode, cache, wsClient, new AnalysisProperties(Maps.<String, String>newHashMap()));
   assertThat(loader.getDefaultStrategy()).isEqualTo(LoadStrategy.SERVER_ONLY);
 }
 @Test
 public void no_cache_by_default_in_issues_mode() {
   when(mode.isIssues()).thenReturn(true);
   WSLoader loader =
       underTest.provide(
           mode, cache, wsClient, new AnalysisProperties(Maps.<String, String>newHashMap()));
   assertThat(loader.getDefaultStrategy()).isEqualTo(LoadStrategy.SERVER_ONLY);
 }
Exemplo n.º 3
0
/** Created by AndySJTU on 2015/6/19. */
@Component
public class Config implements InitializingBean {
  private Map<String, DomainAndPort> configs = Maps.newConcurrentHashMap();

  @Autowired private LoadbClient loadbClient;

  @Override
  public void afterPropertiesSet() throws Exception {}

  public DomainAndPort getDomainAndPort(String type) {
    return null;
  }
}