@@ -18,7 +18,9 @@ public void Constructors()
1818 var options = new GraphQLHttpMiddlewareOptions ( ) ;
1919 var executer = Mock . Of < IDocumentExecuter < ISchema > > ( ) ;
2020 var scopeFactory = Mock . Of < IServiceScopeFactory > ( ) ;
21+ #pragma warning disable CS0618 // Type or member is obsolete
2122 var appLifetime = Mock . Of < IHostApplicationLifetime > ( ) ;
23+ #pragma warning restore CS0618 // Type or member is obsolete
2224 Should . Throw < ArgumentNullException > ( ( ) => new GraphQLHttpMiddleware < ISchema > ( null ! , serializer , executer , scopeFactory , options , appLifetime ) ) ;
2325 Should . Throw < ArgumentNullException > ( ( ) => new GraphQLHttpMiddleware < ISchema > ( next , null ! , executer , scopeFactory , options , appLifetime ) ) ;
2426 Should . Throw < ArgumentNullException > ( ( ) => new GraphQLHttpMiddleware < ISchema > ( next , serializer , null ! , scopeFactory , options , appLifetime ) ) ;
@@ -46,7 +48,9 @@ public async Task SchemaSpecificBuilders()
4648 Mock . Of < IDocumentExecuter < Schema > > ( MockBehavior . Strict ) ,
4749 Mock . Of < IServiceScopeFactory > ( MockBehavior . Strict ) ,
4850 new GraphQLHttpMiddlewareOptions ( ) ,
51+ #pragma warning disable CS0618 // Type or member is obsolete
4952 Mock . Of < IHostApplicationLifetime > ( MockBehavior . Strict ) ) ;
53+ #pragma warning restore CS0618 // Type or member is obsolete
5054 var builder = new Mock < IUserContextBuilder < Schema > > ( MockBehavior . Strict ) ;
5155 var d = new Dictionary < string , object ? > { { "test" , "test" } } ;
5256 builder . Setup ( x => x . BuildUserContextAsync ( It . IsAny < HttpContext > ( ) , It . IsAny < object ? > ( ) ) ) . ReturnsAsync ( d ) ;
@@ -60,7 +64,9 @@ public async Task SchemaSpecificBuilders()
6064 private class MyMiddleware < TSchema > : GraphQLHttpMiddleware < TSchema >
6165 where TSchema : ISchema
6266 {
67+ #pragma warning disable CS0618 // Type or member is obsolete
6368 public MyMiddleware ( RequestDelegate next , IGraphQLTextSerializer serializer , IDocumentExecuter < TSchema > executer , IServiceScopeFactory scopeFactory , GraphQLHttpMiddlewareOptions options , IHostApplicationLifetime hostApplicationLifetime )
69+ #pragma warning restore CS0618 // Type or member is obsolete
6470 : base ( next , serializer , executer , scopeFactory , options , hostApplicationLifetime )
6571 {
6672 }
@@ -115,11 +121,13 @@ public void WebSocketSubProtocolNotSupportedError_Message()
115121
116122 public class MyMiddleware : GraphQLHttpMiddleware < ISchema >
117123 {
124+ #pragma warning disable CS0618 // Type or member is obsolete
118125 public MyMiddleware ( ) : this ( Mock . Of < IHostApplicationLifetime > ( MockBehavior . Strict ) )
119126 {
120127 }
121128
122129 public MyMiddleware ( IHostApplicationLifetime hostApplicationLifetime ) : base (
130+ #pragma warning restore CS0618 // Type or member is obsolete
123131 _ => throw new NotSupportedException ( ) ,
124132 Mock . Of < IGraphQLTextSerializer > ( MockBehavior . Strict ) ,
125133 Mock . Of < IDocumentExecuter < ISchema > > ( MockBehavior . Strict ) ,
0 commit comments