use of org.pentaho.platform.dataaccess.datasource.wizard.service.ConnectionServiceException in project data-access by pentaho.
the class MetadataServiceTest method testRemoveMetadataError.
@Test
public void testRemoveMetadataError() throws Exception {
ConnectionServiceException cse = new ConnectionServiceException();
doThrow(cse).when(metadataService).ensureDataAccessPermissionCheck();
try {
metadataService.removeMetadata("metadataId");
fail();
} catch (PentahoAccessControlException e) {
// expected
}
verify(metadataService, times(1)).removeMetadata("metadataId");
}
Aggregations