UberfireBreadcrumbs { void updateBreadcrumbsContainer() { if (thereIsContentOnBreadcrumbs()) { uberfireBreadcrumbsContainer.enable(); } else { uberfireBreadcrumbsContainer.disable(); } } @Inject  UberfireBreadcrumbs(UberfireBreadcrumbsContainer uberfireBreadcrumbsContainer,
                               ManagedInstance<DefaultBreadcrumbsPresenter> breadcrumbsPresenters,
                               PlaceManager placeManager,
                               View view); @PostConstruct void createBreadcrumbs(); void clearBreadcrumbs(final String associatedPerspective); void clearBreadcrumbsAndToolBars(final String associatedPerspective); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final Command command); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final Command command,
                              final boolean removeDeepLevelBreadcrumbsAfterActivation); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final PlaceRequest associatedPlaceRequest); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final PlaceRequest associatedPlaceRequest,
                              final Command command); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final PlaceRequest associatedPlaceRequest,
                              final Command command,
                              final boolean removeDeepLevelBreadcrumbsAfterActivation); void addBreadCrumb(final String associatedPerspective,
                              final BreadcrumbPresenter breadCrumbPresenter); void addToolbar(final String associatedPerspective,
                           final Element toolbar);  }
@Test public void updateBreadcrumbsContainerTest() { assertTrue(uberfireBreadcrumbs.breadcrumbsPerPerspective.isEmpty()); uberfireBreadcrumbs.currentPerspective = "myperspective"; uberfireBreadcrumbs.addBreadCrumb("myperspective", "label", new DefaultPlaceRequest("screen")); verify(uberfireBreadcrumbsContainer).enable(); }
@Test public void updateBreadcrumbsWithNoBreadcrumbsContainerTest() { assertTrue(uberfireBreadcrumbs.breadcrumbsPerPerspective.isEmpty()); uberfireBreadcrumbs.currentPerspective = "myperspective"; uberfireBreadcrumbs.updateBreadcrumbsContainer(); verify(uberfireBreadcrumbsContainer).disable(); }