-
-
Notifications
You must be signed in to change notification settings - Fork 725
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
91d6801
commit 689c52b
Showing
67 changed files
with
1,360 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 102 additions & 22 deletions
124
src/HotChocolate/AspNetCore/src/AspNetCore/Utilities/DefaultHttpResultSerializer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/HotChocolate/AspNetCore/src/AspNetCore/Utilities/HttpResultSerialization.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace HotChocolate.AspNetCore.Utilities | ||
{ | ||
public enum HttpResultSerialization | ||
{ | ||
JsonArray, | ||
MultiPartChunked | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...tChocolate/AspNetCore/test/AspNetCore.Tests/Extensions/ServiceCollectionExtensionTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Linq; | ||
using HotChocolate.AspNetCore.Utilities; | ||
using HotChocolate.Execution.Configuration; | ||
using Microsoft.Extensions.DependencyInjection.Extensions; | ||
using Xunit; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public class ServiceCollectionExtensionTests | ||
{ | ||
[Fact] | ||
public static void AddHttpRequestSerializer_OfT() | ||
{ | ||
// arrange | ||
var serviceCollection = new ServiceCollection(); | ||
|
||
// act | ||
HotChocolateAspNetCoreServiceCollectionExtensions | ||
.AddHttpRequestSerializer<DefaultHttpResultSerializer>(serviceCollection); | ||
|
||
// assert | ||
Assert.Collection( | ||
serviceCollection, | ||
t => | ||
{ | ||
Assert.Equal(typeof(IHttpResultSerializer), t.ServiceType); | ||
Assert.Equal(typeof(DefaultHttpResultSerializer), t.ImplementationType); | ||
}); | ||
} | ||
} | ||
} |
Oops, something went wrong.