Exemplo n.º 1
0
  @Test
  public void shouldNotMatchWhenWrongDomain() throws MessagingException {
    Mail mail = FakeMail.builder().recipients(ANY_AT_JAMES2, OTHER_AT_JAMES2).build();

    assertThat(matcher.match(mail)).isEmpty();
  }
Exemplo n.º 2
0
  @Test
  public void shouldMatchOnlyWhenRightDomain() throws MessagingException {
    Mail mail = FakeMail.builder().recipients(ANY_AT_JAMES, ANY_AT_JAMES2).build();

    assertThat(matcher.match(mail)).containsExactly(ANY_AT_JAMES);
  }