Esempio n. 1
0
  @Test
  public void testSetsTextReplacement() {
    TextReplacementData data = mock(TextReplacementData.class);
    when(data.getId()).thenReturn("r42");

    decorator.setTextReplacement(data);

    verify(text).setData(TEXT_REPLACEMENT.getKey(), "r42");
  }
Esempio n. 2
0
  @Test
  public void testDoesNotSetTextReplacementWithWebClient() {
    environment.setClient(mock(WebClient.class));
    TextReplacementData data = mock(TextReplacementData.class);
    when(data.getId()).thenReturn("r42");

    decorator.setTextReplacement(data);

    verify(text, never()).setData(TEXT_REPLACEMENT.getKey(), "r42");
  }