@Test(expectedExceptions = IllegalArgumentException.class) public void testRemoveChannelNullChannel() throws Exception { notificationService.removeChannel(null); }
public void removeChannel(final Channel channel) { notNull(channel, "channel"); notNull(channel.getMeta(), "channel.meta"); notEmpty(channel.getMeta().getUri(), "channel.meta.uri"); try { restTemplate.delete(channel.getMeta().getUri()); } catch (GoodDataRestException | RestClientException e) { throw new GoodDataException("Unable to delete channel", e); } }
NotificationService extends AbstractService { public void removeChannel(final Channel channel) { notNull(channel, "channel"); notNull(channel.getMeta(), "channel.meta"); notEmpty(channel.getMeta().getUri(), "channel.meta.uri"); try { restTemplate.delete(channel.getMeta().getUri()); } catch (GoodDataRestException | RestClientException e) { throw new GoodDataException("Unable to delete channel", e); } } }
NotificationService extends AbstractService { public void removeChannel(final Channel channel) { notNull(channel, "channel"); notNull(channel.getMeta(), "channel.meta"); notEmpty(channel.getMeta().getUri(), "channel.meta.uri"); try { restTemplate.delete(channel.getMeta().getUri()); } catch (GoodDataRestException | RestClientException e) { throw new GoodDataException("Unable to delete channel", e); } } NotificationService(final RestTemplate restTemplate, final GoodDataSettings settings); }
NotificationService extends AbstractService { public void removeChannel(final Channel channel) { notNull(channel, "channel"); notNull(channel.getMeta(), "channel.meta"); notEmpty(channel.getMeta().getUri(), "channel.meta.uri"); try { restTemplate.delete(channel.getMeta().getUri()); } catch (GoodDataRestException | RestClientException e) { throw new GoodDataException("Unable to delete channel", e); } } NotificationService(final RestTemplate restTemplate, final GoodDataSettings settings); void triggerEvent(final Project project, final ProjectEvent event); Channel createChannel(final Account account, final Channel channel); void removeChannel(final Channel channel); Subscription createSubscription(final Project project, final Account account, final Subscription subscription); void removeSubscription(final Subscription subscription); }
NotificationService extends AbstractService { public void removeChannel(final Channel channel) { notNull(channel, "channel"); notNull(channel.getMeta(), "channel.meta"); notEmpty(channel.getMeta().getUri(), "channel.meta.uri"); try { restTemplate.delete(channel.getMeta().getUri()); } catch (GoodDataRestException | RestClientException e) { throw new GoodDataException("Unable to delete channel", e); } } NotificationService(final RestTemplate restTemplate, final GoodDataSettings settings); void triggerEvent(final Project project, final ProjectEvent event); Channel createChannel(final Account account, final Channel channel); void removeChannel(final Channel channel); Subscription createSubscription(final Project project, final Account account, final Subscription subscription); void removeSubscription(final Subscription subscription);  }