@Test public void testHasBoth() { when(params.getPredefinedSetOfPages()).thenReturn(PredefinedSetOfPages.EVEN_PAGES); when(params.getPageSelection()).thenReturn(Collections.singleton(range)); assertTrue(victim.isValid(params, null)); }
@Test public void testHasNone() { when(params.getPredefinedSetOfPages()).thenReturn(PredefinedSetOfPages.NONE); when(params.getPageSelection()).thenReturn(Collections.EMPTY_SET); assertFalse(victim.isValid(params, null)); }
@Test public void testHasDefault() { when(params.getPredefinedSetOfPages()).thenReturn(PredefinedSetOfPages.EVEN_PAGES); assertTrue(victim.isValid(params, null)); }