Skip to content

Commit

Permalink
bumping CR version to be used within SdkCommon scope (#4682)
Browse files Browse the repository at this point in the history
* bumping CR version to be used within SdkCommon scope

* fixing test asserts
  • Loading branch information
shahabhijeet authored Aug 21, 2018
1 parent be473ea commit 33efc6b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/SdkCommon/CR.test.reference.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove('test.props'))" />
<ItemGroup>
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.12, 3.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.13, 3.0.0)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="$([MSBuild]::GetPathOfFileAbove('CR.test.reference.props'))" />
<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<Description>Net 452 test project for ClientRuntime.Azure</Description>
Expand All @@ -10,14 +10,7 @@
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />

<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.12" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void TestGetServiceClientWithoutHandlers()
Environment.SetEnvironmentVariable("TEST_CSM_ORGID_AUTHENTICATION", "Environment=Next;SubscriptionId=ee39cb6d-d45b-4694-825a-f4d6f87ed72a;RawToken=abc");
HttpMockServer.Initialize("Microsoft.Rest.ClientRuntime.Azure.TestFramework.Test.Authentication.Subscription", "CsmTests.json");
var client = MockContext.Start((this.GetType().FullName), "CsmTests.json").GetServiceClient<SimpleClient>();
Assert.Equal(4, client.HttpMessageHandlers.Count());
Assert.Equal(5, client.HttpMessageHandlers.Count());
Assert.True(client.HttpMessageHandlers.First() is HttpMockServer);
}

Expand All @@ -117,7 +117,7 @@ public void TestGetServiceClientWithHandlers()
HttpMockServer.RecordsDirectory = "SessionRecords";
HttpMockServer.Initialize("Microsoft.Rest.ClientRuntime.Azure.TestFramework.Test.Authentication.Subscription", "CsmTests.json");
var client = MockContext.Start((this.GetType().FullName), "CsmTests.json").GetServiceClient<SimpleClient>(handlers: new MockHandler());
Assert.Equal(5, client.HttpMessageHandlers.Count());
Assert.Equal(6, client.HttpMessageHandlers.Count());
Assert.True(client.HttpMessageHandlers.First() is MockHandler);
}

Expand All @@ -130,7 +130,7 @@ public void TestGetServiceClientWhenSubscriptionIdIsNone()
Environment.SetEnvironmentVariable("TEST_CSM_ORGID_AUTHENTICATION", "Environment=Next;SubscriptionId=None;RawToken=abc");
HttpMockServer.Initialize("Microsoft.Rest.ClientRuntime.Azure.TestFramework.Test.Authentication.Subscription", "CsmClientSubscriptionNone.json");
var client = MockContext.Start((this.GetType().FullName), "CsmClientSubscriptionNone").GetServiceClient<SimpleClient>(handlers: new MockHandler());
Assert.Equal(5, client.HttpMessageHandlers.Count());
Assert.Equal(6, client.HttpMessageHandlers.Count());
Assert.True(client.HttpMessageHandlers.First() is MockHandler);
}

Expand Down
2 changes: 1 addition & 1 deletion src/SdkCommon/clientruntime.reference.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.props'))" />
<ItemGroup>
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.12, 3.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.13, 3.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
Expand Down

0 comments on commit 33efc6b

Please sign in to comment.