Exemplo n.º 1
0
        public Task CreateTopicPermissionAsync(TopicPermissionInfo topicPermissionInfo,
                                               CancellationToken cancellationToken = default(CancellationToken))
        {
            Ensure.ArgumentNotNull(topicPermissionInfo, nameof(topicPermissionInfo));

            return(PutAsync(
                       $"topic-permissions/{SanitiseVhostName(topicPermissionInfo.GetVirtualHostName())}/{topicPermissionInfo.GetUserName()}",
                       topicPermissionInfo, cancellationToken));
        }
Exemplo n.º 2
0
 public void Should_return_the_correct_vhost_name()
 {
     topicPermissionInfo.GetVirtualHostName().ShouldEqual(vhost.Name);
 }