public void GetAlertConfigurationValidatesArguments()
        {
            MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient();

            Assert.That(() => adminClient.GetAlertConfigurationAsync(null), Throws.InstanceOf <ArgumentNullException>());
            Assert.That(() => adminClient.GetAlertConfigurationAsync(""), Throws.InstanceOf <ArgumentException>());
            Assert.That(() => adminClient.GetAlertConfigurationAsync("configId"), Throws.InstanceOf <ArgumentException>().With.InnerException.TypeOf(typeof(FormatException)));

            Assert.That(() => adminClient.GetAlertConfiguration(null), Throws.InstanceOf <ArgumentNullException>());
            Assert.That(() => adminClient.GetAlertConfiguration(""), Throws.InstanceOf <ArgumentException>());
            Assert.That(() => adminClient.GetAlertConfiguration("configId"), Throws.InstanceOf <ArgumentException>().With.InnerException.TypeOf(typeof(FormatException)));
        }
        public void GetAlertConfigurationRespectsTheCancellationToken()
        {
            MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient();

            using var cancellationSource = new CancellationTokenSource();
            cancellationSource.Cancel();

            Assert.That(() => adminClient.GetAlertConfigurationAsync(FakeGuid, cancellationSource.Token), Throws.InstanceOf <OperationCanceledException>());
            Assert.That(() => adminClient.GetAlertConfiguration(FakeGuid, cancellationSource.Token), Throws.InstanceOf <OperationCanceledException>());
        }