@Test public void shouldNotIncludePluginMenusWhenThereIsNoProject() throws Exception { givenThereIsNoProject(); Menu menu = givenAMenu(); menus.includeMenus(menu, parameters); assertThat(menu.toString(), not(containsString("/projects"))); mockery.assertIsSatisfied(); }
@Test public void whenThereIsAnIterationCreatePluginMenus() throws Exception { givenThereIsAProjectWithId(5l); givenThereIsAnIterationWithId(9l); givenAnythingElseIsIgnored(); Menu menu = givenAMenu(); menus.includeMenus(menu, parameters); assertThat(menu.toString(), containsString("/projects/5/iterations/9")); mockery.assertIsSatisfied(); }