示例#1
0
        private async Task And_a_single_service_account()
        {
            using var client             = LocalhostRestClient.Create();
            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);
        }
示例#2
0
        private async Task And_a_single_topic()
        {
            using var client    = LocalhostRestClient.Create();
            _topicCreateCommand = TopicCreate.Create(
                name: Guid.NewGuid().ToString(),
                partitionCount: 1
                );

            await client.Topics.CreateAsync(_topicCreateCommand);
        }
        private async Task And_a_single_topic()
        {
            using var client = LocalhostRestClient.Create();
            _topicName       = Guid.NewGuid().ToString();
            var topicCreate = TopicCreate.Create(
                name: _topicName,
                partitionCount: 1
                );

            await client.Topics.CreateAsync(topicCreate);
        }
示例#4
0
        private async Task And_a_single_apiKey()
        {
            using var client = LocalhostRestClient.Create();

            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            _serviceAccount = await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);

            _apiKeyCreate = new ApiKeyCreate()
            {
                ServiceAccountId = _serviceAccount.Id,
                Description      = "GetAllScenario"
            };

            _apiKey = await client.ApiKeys.CreateAsync(_apiKeyCreate);
        }
示例#5
0
        private async Task And_a_single_acl()
        {
            using var client             = LocalhostRestClient.Create();
            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            _serviceAccount = await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);

            _aclCreateDelete = new AclCreateDelete
            {
                ServiceAccountId = Convert.ToInt64(_serviceAccount.Id),
                Allow            = true,
                Operation        = "WRITE",
                TopicPrefix      = "itsAThing"
            };

            await client.Acls.CreateAsync(_aclCreateDelete);
        }
示例#6
0
 private void Given_a_topic_client()
 {
     _client = LocalhostRestClient.Create();
 }
示例#7
0
 private void Given_a_apiKey_client()
 {
     _client = LocalhostRestClient.Create();
 }
示例#8
0
 private void Given_an_acl_client()
 {
     _client = LocalhostRestClient.Create();
 }
示例#9
0
 private void Given_a_serviceAccount_client()
 {
     _client = LocalhostRestClient.Create();
 }