Exemplo n.º 1
0
        public async Task UpdateSolutionAsync(int solutionID, UpdateSolutionRequest req)
        {
            if (solutionID < 1)
            {
                throw new Client.Exception.UKFastClientValidationException("Invalid solution id");
            }

            await this.Client.PatchAsync($"/ecloud/v1/solutions/{solutionID}", req);
        }
Exemplo n.º 2
0
        public async Task UpdateSolutionAsync(string solutionID, UpdateSolutionRequest req)
        {
            if (string.IsNullOrWhiteSpace(solutionID))
            {
                throw new UKFastClientValidationException("Invalid solution id");
            }

            await this.Client.PatchAsync($"/draas/v1/solutions/{solutionID}", req);
        }
        public async Task UpdateSolutionAsync_ValidParameters_ExpectedClientCall()
        {
            IUKFastDRaaSClient client = Substitute.For <IUKFastDRaaSClient>();

            UpdateSolutionRequest req = new UpdateSolutionRequest
            {
                IOPSTierID = "11111111-1111-1111-1111-111111111111"
            };

            var ops = new SolutionOperations <Solution>(client);
            await ops.UpdateSolutionAsync("00000000-0000-0000-0000-000000000000", req);

            await client.Received().PatchAsync("/draas/v1/solutions/00000000-0000-0000-0000-000000000000", req);
        }
Exemplo n.º 4
0
        public async Task UpdateSolutionAsync_ExpectedResult()
        {
            UpdateSolutionRequest req = new UpdateSolutionRequest()
            {
                Name = "testsolution"
            };

            IUKFastECloudClient client = Substitute.For <IUKFastECloudClient>();

            var ops = new SolutionOperations <Solution>(client);
            await ops.UpdateSolutionAsync(123, req);

            await client.Received().PatchAsync("/ecloud/v1/solutions/123", req);
        }