public void GetChannelsChannelIdSubscriptionsTest() { // TODO: add unit test for the method 'GetChannelsChannelIdSubscriptions' string channelId = null; // TODO: replace null with proper value var response = instance.GetChannelsChannelIdSubscriptions(channelId); Assert.IsInstanceOf <ChannelTopicEntityListing> (response, "response is ChannelTopicEntityListing"); }
/// <summary> /// Removes the subscribed topic /// </summary> /// <param name="topic">The notification topic to remove</param> public void RemoveSubscription(string topic) { var subscriptions = _notificationsApi.GetChannelsChannelIdSubscriptions(Channel.Id); var match = subscriptions.Entities.FirstOrDefault( e => e.Id.Equals(topic, StringComparison.InvariantCultureIgnoreCase)); if (match == null) { return; } subscriptions.Entities.Remove(match); _notificationsApi.PutChannelsChannelIdSubscriptions(Channel.Id, subscriptions.Entities); _typeMap.Remove(topic); }