コード例 #1
0
 public async Task UpdateServerMetadataWithEmptyImageIdThrows()
 {
     var metadata = new Dictionary<string, string>() { { "item1", "value1" } };
     var client = new ComputeServiceClient(GetValidCreds(), "Nova", CancellationToken.None, this.ServiceLocator);
     await client.UpdateServerMetadata(string.Empty, metadata);
 }
コード例 #2
0
 public async Task UpdateServerMetadataWithNullMetadataThrows()
 {
     var client = new ComputeServiceClient(GetValidCreds(), "Nova", CancellationToken.None, this.ServiceLocator);
     await client.UpdateServerMetadata("12345", null);
 }
コード例 #3
0
        public async Task CanUpdateServerMetadata()
        {
            var metadata = new Dictionary<string, string>() { { "item1", "value1" } };
            this.ServicePocoClient.UpdateServerMetadataDelegate = async (flavorId, meta) =>
            {
                await Task.Run(() =>
                {
                    Assert.AreEqual(flavorId, "12345");
                    Assert.AreEqual(metadata, meta);
                });
            };

            var client = new ComputeServiceClient(GetValidCreds(), "Nova", CancellationToken.None, this.ServiceLocator);
            await client.UpdateServerMetadata("12345", metadata);
        }