@Test public void getPageById() { final Views views = new Views(VIEWS); assertThat(views.getPage("fake-page").getTarget(), is(FakePage.class)); assertThat(views.getPage("fake-widget"), nullValue()); assertThat(views.getPage("foo"), nullValue()); assertThat(views.getPage("fake-resourceviewer").getTarget(), is(FakeResourceViewer.class)); }
@Test public void should_get_page_by_id() { final Views views = new Views(VIEWS); assertThat(views.getPage("fake-page").getTarget().getClass()).isEqualTo(FakePage.class); assertThat(views.getPage("fake-widget")).isNull(); assertThat(views.getPage("foo")).isNull(); assertThat(views.getPage("fake-resourceviewer").getTarget().getClass()) .isEqualTo(FakeResourceViewer.class); }