コード例 #1
0
ファイル: ViewsTest.java プロジェクト: ricesorry/sonar
 @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));
 }
コード例 #2
0
ファイル: ViewsTest.java プロジェクト: jorispz/sonar
 @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);
 }