use of com.google.gwt.text.shared.SafeHtmlRenderer in project kie-wb-common by kiegroup.
the class AbstractProxyPopupDropDownListBoxRenderTest method listBoxShouldHaveTheRightItems.
@Test
public void listBoxShouldHaveTheRightItems() {
final SafeHtmlRenderer renderer = mock(SafeHtmlRenderer.class);
listBoxDropDown.render(mock(Cell.Context.class), "", mock(SafeHtmlBuilder.class), renderer);
verify(listBox).addItem("Fork", "1");
verify(listBox).addItem("Spoon", "2");
verify(listBox).addItem("Knife", "3");
verify(listBox).addItem("Spork", "4");
verify(listBox).addItem("Fork, Spoon and Knife", "\"1,2,3\"");
}
use of com.google.gwt.text.shared.SafeHtmlRenderer in project kie-wb-common by kiegroup.
the class AbstractProxyPopupDropDownListBoxRenderTest method noExistingPairForTheValue.
@Test
public void noExistingPairForTheValue() {
doReturn(true).when(listBox).isMultipleSelect();
final SafeHtmlRenderer renderer = mock(SafeHtmlRenderer.class);
listBoxDropDown.render(mock(Cell.Context.class), "10", mock(SafeHtmlBuilder.class), renderer);
verify(renderer).render("10");
}
use of com.google.gwt.text.shared.SafeHtmlRenderer in project kie-wb-common by kiegroup.
the class AbstractProxyPopupDropDownListBoxRenderTest method renderFork.
@Test
public void renderFork() {
doReturn(true).when(listBox).isMultipleSelect();
final SafeHtmlRenderer renderer = mock(SafeHtmlRenderer.class);
listBoxDropDown.render(mock(Cell.Context.class), "1", mock(SafeHtmlBuilder.class), renderer);
verify(renderer).render("Fork");
}
use of com.google.gwt.text.shared.SafeHtmlRenderer in project kie-wb-common by kiegroup.
the class AbstractProxyPopupDropDownListBoxRenderTest method appendIsCalled.
@Test
public void appendIsCalled() {
final SafeHtmlBuilder sb = mock(SafeHtmlBuilder.class);
final SafeHtmlRenderer renderer = mock(SafeHtmlRenderer.class);
final SafeHtml safeHtml = mock(SafeHtml.class);
doReturn(safeHtml).when(renderer).render(anyString());
listBoxDropDown.render(mock(Cell.Context.class), "", sb, renderer);
verify(sb).append(safeHtml);
}
use of com.google.gwt.text.shared.SafeHtmlRenderer in project kie-wb-common by kiegroup.
the class AbstractProxyPopupDropDownListBoxRenderTest method renderForkSpoonKnife.
@Test
public void renderForkSpoonKnife() {
doReturn(true).when(listBox).isMultipleSelect();
final SafeHtmlRenderer renderer = mock(SafeHtmlRenderer.class);
listBoxDropDown.render(mock(Cell.Context.class), "\"1,2,3\"", mock(SafeHtmlBuilder.class), renderer);
verify(renderer).render("Fork, Spoon and Knife");
}
Aggregations