Skip to content

Commit

Permalink
Merge pull request #356 from microsoftgraph/januaryrelease
Browse files Browse the repository at this point in the history
January Release
  • Loading branch information
MIchaelMainer authored Jan 15, 2019
2 parents a36579c + 470ef44 commit 5b44b62
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
6 changes: 4 additions & 2 deletions src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
<PackageId>Microsoft.Graph.Core</PackageId>
<PackageTags>Microsoft Office365;Graph;GraphServiceClient;Outlook;OneDrive;AzureAD;GraphAPI;Productivity;SharePoint;Intune;SDK</PackageTags>
<PackageReleaseNotes>
January 2019 Release Summary (version 1.13.0-preview.2)
January 2019 Release Summary (version 1.13.0)

- Authentication handler added.
- Removed Newtonsoft.Json package reference upper bound limitation.
- Makes GraphClientFactory internal.
- HttpProvider uses GraphClientFactory.
</PackageReleaseNotes>
<PackageProjectUrl>https://developer.microsoft.com/graph</PackageProjectUrl>
<PackageLicenseUrl>http://aka.ms/devservicesagreement</PackageLicenseUrl>
Expand All @@ -36,7 +38,7 @@ January 2019 Release Summary (version 1.13.0-preview.2)
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>1.13.0-preview.2</Version>
<Version>1.13.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard1.1|AnyCPU'">
<DocumentationFile>bin\Release\netstandard1.1\Microsoft.Graph.Core.xml</DocumentationFile>
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Graph/Microsoft.Graph.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageId>Microsoft.Graph</PackageId>
<PackageTags>Microsoft Office365;Graph;GraphServiceClient;Outlook;OneDrive;AzureAD;GraphAPI;Productivity;SharePoint;Intune;SDK</PackageTags>
<PackageReleaseNotes>
January 2019 Release Summary (version 1.13.0-preview.2)
January 2019 Release Summary (version 1.13.0)

New functionality
- Added new Teams API functionality.
Expand Down Expand Up @@ -45,7 +45,7 @@ Updated functionality
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>1.13.0-preview.2</Version>
<Version>1.13.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard1.1|AnyCPU'">
<DocumentationFile>bin\Release\Microsoft.Graph.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage
{
_response1Sent = true;
_response1.RequestMessage = request;
return _response1;
return await Task.FromResult(_response1);
}
else
{
_response1Sent = false;
_response2.RequestMessage = request;
return _response2;
return await Task.FromResult(_response2);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class GraphClientFactoryTests : IDisposable
public GraphClientFactoryTests()
{
this.testHttpMessageHandler = new MockRedirectHandler();
handlers = handlers = new DelegatingHandler[3];
handlers = new DelegatingHandler[3];
handlers[0] = new RetryHandler();
handlers[1] = new RedirectHandler();
handlers[2] = new AuthenticationHandler(authenticationProvider.Object);
Expand All @@ -37,24 +37,27 @@ public void Dispose()
this.testHttpMessageHandler.Dispose();
}

// Note:
// 1. Xunit's IsType doesn't consider inheritance behind the classes.
// 2. We can't control the order of execution for the tests
// and 'GraphClientFactory.DefaultHttpHandler' can easily be modified
// by other tests since it's a static delegate.
[Fact]
public void CreatePipelineWithoutHttpMessageHandlerInput()
{
using (RetryHandler retryHandler = (RetryHandler)GraphClientFactory.CreatePipeline(handlers))
using (RedirectHandler redirectHandler = (RedirectHandler)retryHandler.InnerHandler)
using (AuthenticationHandler authenticationHandler = (AuthenticationHandler)redirectHandler.InnerHandler)
using (HttpClientHandler innerMost = (HttpClientHandler)authenticationHandler.InnerHandler)
using (HttpMessageHandler innerMost = authenticationHandler.InnerHandler)
{
System.Diagnostics.Debug.WriteLine("InvalidCast: " + authenticationHandler.InnerHandler.GetType().ToString());

Assert.NotNull(retryHandler);
Assert.NotNull(redirectHandler);
Assert.NotNull(authenticationHandler);
Assert.NotNull(innerMost);
Assert.IsType(typeof(RetryHandler), retryHandler);
Assert.IsType(typeof(RedirectHandler), redirectHandler);
Assert.IsType(typeof(AuthenticationHandler), authenticationHandler);
Assert.IsType(typeof(HttpClientHandler), innerMost);
Assert.True(innerMost is HttpMessageHandler);
}

}
Expand Down

0 comments on commit 5b44b62

Please sign in to comment.