Beispiel #1
0
        public async Task CreateOrUpdate()
        {
            var container = await GetCollectionAsync();

            var grafanaName = Recording.GenerateAssetName("sdkTestGrafana");
            var input       = ResourceDataHelper.GetGrafanaResourceData(DefaultLocation);
            var lro         = await container.CreateOrUpdateAsync(WaitUntil.Completed, grafanaName, input);

            ManagedGrafanaResource actualResource = lro.Value;

            Assert.AreEqual(grafanaName, actualResource.Data.Name);
        }
Beispiel #2
0
        public async Task Get()
        {
            var container = await GetCollectionAsync();

            var grafanaName = Recording.GenerateAssetName("sdkTestGrafana");
            var input       = ResourceDataHelper.GetGrafanaResourceData(DefaultLocation);
            var lro         = await container.CreateOrUpdateAsync(WaitUntil.Completed, grafanaName, input);

            ManagedGrafanaResource resource1 = lro.Value;
            ManagedGrafanaResource resource2 = await container.GetAsync(grafanaName);

            ResourceDataHelper.AssertGrafana(resource1.Data, resource2.Data);
        }