コード例 #1
0
        private static void AddEnvironment(AddEnvironmentOptions opts)
        {
            if (string.IsNullOrEmpty(opts.Password))
            {
                opts.Password = GetPassword();
            }
            IToolsModule module = new AddEnvironment(opts);

            var result = module.Run();

            Console.WriteLine(result);
        }
コード例 #2
0
        private async Task WhenWeAddAnEnvironment()
        {
            _addEnvironmentMessage = DataFixture.Build <AddEnvironment>()
                                     .With(e => e.Key, TestUtilities.CreateKey(30))
                                     .With(e => e.ExpectedProjectVersion, 0)
                                     .Create();

            _response = await Client
                        .Request($"/management-api/projects/{_createProjectMessage.ProjectId}/environments/add")
                        .PostJsonAsync(_addEnvironmentMessage);

            _responseContent = await _response.Content.ReadAsStringAsync();
        }