Updated UnitTests
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Cloudflare.Zones.Tests.ZoneSettingsExtensions
|
||||
|
||||
// Act
|
||||
#pragma warning disable CS0618
|
||||
var response = await client.EditMultipleZoneSettings(_request, TestContext.CancellationTokenSource.Token);
|
||||
var response = await client.EditMultipleZoneSettings(_request, TestContext.CancellationToken);
|
||||
#pragma warning restore CS0618
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Cloudflare.Zones.Tests.ZoneSettingsExtensions
|
||||
var client = GetClient();
|
||||
|
||||
// Act
|
||||
var response = await client.EditZoneSetting(_request, TestContext.CancellationTokenSource.Token);
|
||||
var response = await client.EditZoneSetting(_request, TestContext.CancellationToken);
|
||||
|
||||
// Assert
|
||||
Assert.IsNotNull(response);
|
||||
@@ -80,7 +80,7 @@ namespace Cloudflare.Zones.Tests.ZoneSettingsExtensions
|
||||
var client = GetClient();
|
||||
|
||||
// Act
|
||||
var response = await client.EditZoneSetting(_request, TestContext.CancellationTokenSource.Token);
|
||||
var response = await client.EditZoneSetting(_request, TestContext.CancellationToken);
|
||||
|
||||
// Assert
|
||||
Assert.IsNotNull(response);
|
||||
@@ -105,7 +105,7 @@ namespace Cloudflare.Zones.Tests.ZoneSettingsExtensions
|
||||
var client = GetClient();
|
||||
|
||||
// Act & Assert
|
||||
await Assert.ThrowsExactlyAsync<ArgumentException>(async () => await client.EditZoneSetting(request, TestContext.CancellationTokenSource.Token));
|
||||
await Assert.ThrowsExactlyAsync<ArgumentException>(async () => await client.EditZoneSetting(request, TestContext.CancellationToken));
|
||||
}
|
||||
|
||||
private ICloudflareClient GetClient()
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Cloudflare.Zones.Tests.ZoneSettingsExtensions
|
||||
|
||||
// Act
|
||||
#pragma warning disable CS0618
|
||||
var response = await client.GetAllZoneSettings(ZoneId, TestContext.CancellationTokenSource.Token);
|
||||
var response = await client.GetAllZoneSettings(ZoneId, TestContext.CancellationToken);
|
||||
#pragma warning restore CS0618
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Cloudflare.Zones.Tests.ZoneSettingsExtensions
|
||||
var client = GetClient();
|
||||
|
||||
// Act
|
||||
var response = await client.GetZoneSetting<SSL>(ZoneId, TestContext.CancellationTokenSource.Token);
|
||||
var response = await client.GetZoneSetting<SSL>(ZoneId, TestContext.CancellationToken);
|
||||
|
||||
// Assert
|
||||
Assert.IsNotNull(response);
|
||||
@@ -69,7 +69,7 @@ namespace Cloudflare.Zones.Tests.ZoneSettingsExtensions
|
||||
var client = GetClient();
|
||||
|
||||
// Act & Assert
|
||||
await Assert.ThrowsExactlyAsync<ArgumentException>(async () => await client.GetZoneSetting<TestSetting>(ZoneId, TestContext.CancellationTokenSource.Token));
|
||||
await Assert.ThrowsExactlyAsync<ArgumentException>(async () => await client.GetZoneSetting<TestSetting>(ZoneId, TestContext.CancellationToken));
|
||||
}
|
||||
|
||||
private ICloudflareClient GetClient()
|
||||
|
||||
Reference in New Issue
Block a user