コード例 #1
0
 /**
  * Tests suppressHostByProvider getter.
  *
  * @throws Exception
  */
 @Test
 public void testSuppressHostByProvider() throws Exception {
   Set<String> supprsuppressHostByProvider = config.suppressHostByProvider();
   assertNotNull("suppressHostByProvider should not be null", supprsuppressHostByProvider);
   assertThat(supprsuppressHostByProvider.size(), is(2));
   assertTrue(supprsuppressHostByProvider.contains(PROVIDER_1));
   assertTrue(supprsuppressHostByProvider.contains(PROVIDER_2));
 }
コード例 #2
0
  /**
   * Tests suppressHostByProvider setter.
   *
   * @throws Exception
   */
  @Test
  public void testSetHostLearning() throws Exception {
    ImmutableSet.Builder<String> builder = ImmutableSet.builder();
    builder.add(PROVIDER_3);
    config.setSuppressHostByProvider(builder.build());

    Set<String> supprsuppressHostByProvider = config.suppressHostByProvider();
    assertNotNull("suppressHostByProvider should not be null", supprsuppressHostByProvider);
    assertThat(supprsuppressHostByProvider.size(), is(1));
    assertTrue(supprsuppressHostByProvider.contains(PROVIDER_3));
  }