autorest.azure-functions-cs.../test/AutoRest.TestServer.Tests/subscriptionId-apiVersion.cs

25 строки
925 B
C#
Исходник Постоянная ссылка Обычный вид История

2020-04-22 23:15:19 +03:00
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System.Threading.Tasks;
using AutoRest.TestServer.Tests.Infrastructure;
using NUnit.Framework;
using subscriptionId_apiVersion;
namespace AutoRest.TestServer.Tests
{
public class SubscriptionIdApiVersionTest: TestServerTestBase
{
public SubscriptionIdApiVersionTest(TestServerVersion version) : base(version, "azureUrl") { }
[Test]
[IgnoreOnTestServer(TestServerVersion.V2, "No recording")]
public Task SubscriptionIdAndApiVersion() => Test(async (host, pipeline) =>
{
var result = await new GroupClient(ClientDiagnostics, pipeline, "sub", host, "2014-04-01-preview").GetSampleResourceGroupAsync("testgroup101");
Assert.AreEqual("West US", result.Value.Location);
Assert.AreEqual("testgroup101", result.Value.Name);
});
}
}