Пример #1
0
  @Test
  public void shouldReturnNonEmptyKonvGroupScopeWhenChoosingOverAnEmptyListOfInputKonvGroups() {

    List<KonvGroup> selected = settings.chooseOver(Collections.EMPTY_LIST);

    assertThat(selected, hasItems(konvGroup));
    assertThat(selected.size(), is(1));
  }
Пример #2
0
  @Test
  public void shouldReturnNonEmptyKonvGroupScopeWhenChoosingOverNonEmptyListOfInputKonvGroups() {
    final KonvGroup inputKonvGroup = mock(KonvGroup.class);

    List<KonvGroup> selected = settings.chooseOver(Arrays.asList(inputKonvGroup));

    assertThat(selected, hasItems(konvGroup));
    assertThat(selected, not(hasItems(inputKonvGroup)));
  }
Пример #3
0
  @Test
  public void shouldReturnInputKonvGroupListWhenAnEmptyKonvGroupScopeIsFound() {

    settings.shrinkKonvGroupScope(konvGroup);
    assertThat(settings.hasKonvGroupSettings(), is(Boolean.FALSE));

    final KonvGroup inputKonvGroup = mock(KonvGroup.class);

    List<KonvGroup> selected = settings.chooseOver(Arrays.asList(inputKonvGroup));

    assertThat(selected, hasItems(inputKonvGroup));
    assertThat(selected, not(hasItems(konvGroup)));
  }