コード例 #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));
        }
コード例 #2
0
 public void Should_return_the_correct_user_name()
 {
     topicPermissionInfo.GetUserName().ShouldEqual(user.Name);
 }