@Test(expected = AuthorizationException.class) public void testCanDeleteStartPageTabFailWithException() { final long tabIdToDelete = 9L; setTabGroupIdExpectations(tabIdToDelete, false); sut.canDeleteStartPageTab(TEST_USER_ACCOUNTID, new Long(tabIdToDelete), true); context.assertIsSatisfied(); }
public boolean canDeleteStartPageTab(final String inAccountId, final Long inTabId, final boolean throwException) { AuthorizationException exception = throwException ? new AuthorizationException( "Insufficient permissions to delete tab.") : null; return isCurrentUserStartTab(inAccountId, inTabId, exception); }
TabPermission { public boolean canDeleteStartPageTab(final String inAccountId, final Long inTabId, final boolean throwException) { AuthorizationException exception = throwException ? new AuthorizationException( "Insufficient permissions to delete tab.") : null; return isCurrentUserStartTab(inAccountId, inTabId, exception); } }
TabPermission { public boolean canDeleteStartPageTab(final String inAccountId, final Long inTabId, final boolean throwException) { AuthorizationException exception = throwException ? new AuthorizationException( "Insufficient permissions to delete tab.") : null; return isCurrentUserStartTab(inAccountId, inTabId, exception); } TabPermission(final GetTabPermissionByPersonAndTab inTabPermissionsMapper); }
TabPermission { public boolean canDeleteStartPageTab(final String inAccountId, final Long inTabId, final boolean throwException) { AuthorizationException exception = throwException ? new AuthorizationException( "Insufficient permissions to delete tab.") : null; return isCurrentUserStartTab(inAccountId, inTabId, exception); } TabPermission(final GetTabPermissionByPersonAndTab inTabPermissionsMapper); boolean canDeleteStartPageTab(final String inAccountId, final Long inTabId, final boolean throwException); boolean canChangeTabLayout(final String inAccountId, final Long inTabId, final boolean throwException); boolean canModifyGadgets(final String inAccountId, final Long inTabId, final boolean throwException); boolean canRenameTab(final String inAccountId, final Long inTabId, final boolean throwException); }
TabPermission { public boolean canDeleteStartPageTab(final String inAccountId, final Long inTabId, final boolean throwException) { AuthorizationException exception = throwException ? new AuthorizationException( "Insufficient permissions to delete tab.") : null; return isCurrentUserStartTab(inAccountId, inTabId, exception); } TabPermission(final GetTabPermissionByPersonAndTab inTabPermissionsMapper); boolean canDeleteStartPageTab(final String inAccountId, final Long inTabId, final boolean throwException); boolean canChangeTabLayout(final String inAccountId, final Long inTabId, final boolean throwException); boolean canModifyGadgets(final String inAccountId, final Long inTabId, final boolean throwException); boolean canRenameTab(final String inAccountId, final Long inTabId, final boolean throwException);  }