@@ -30,7 +30,7 @@ public void SetUp()
30
30
context . SetupProperty ( c => c . InstanceServices , serviceProvider ) ;
31
31
ExecutionContext = context . Object ;
32
32
33
- Subject = new Query ( serviceProvider . GetService < IQueryFunction > ( ) , serviceProvider . GetService < ILoggerFactory > ( ) ) ;
33
+ Subject = new Query ( serviceProvider . GetService < IQueryFunction > ( ) ! , serviceProvider . GetService < ILoggerFactory > ( ) ! ) ;
34
34
}
35
35
36
36
[ Test ]
@@ -41,7 +41,7 @@ public async Task should_work()
41
41
var result = await Subject . Run ( req , ExecutionContext , "BarQuery" ) ;
42
42
var value = await result . AsAsync < Bar > ( ) ;
43
43
44
- value . Id . Should ( ) . Be ( 1 ) ;
44
+ value ! . Id . Should ( ) . Be ( 1 ) ;
45
45
value . Value . Should ( ) . NotBeEmpty ( ) ;
46
46
}
47
47
@@ -55,8 +55,8 @@ public async Task should_handle_errors()
55
55
await result . ShouldBeErrorAsync ( "The query type 'FailQuery' could not be found" ) ;
56
56
}
57
57
58
- FunctionContext ExecutionContext ;
59
- Query Subject ;
58
+ FunctionContext ExecutionContext = null ! ;
59
+ Query Subject = null ! ;
60
60
}
61
61
62
62
public class when_using_the_real_function_via_Get
@@ -73,7 +73,7 @@ public void SetUp()
73
73
context . SetupProperty ( c => c . InstanceServices , serviceProvider ) ;
74
74
ExecutionContext = context . Object ;
75
75
76
- Subject = new Query ( serviceProvider . GetService < IQueryFunction > ( ) , serviceProvider . GetService < ILoggerFactory > ( ) ) ;
76
+ Subject = new Query ( serviceProvider . GetService < IQueryFunction > ( ) ! , serviceProvider . GetService < ILoggerFactory > ( ) ! ) ;
77
77
}
78
78
79
79
[ Test ]
@@ -84,7 +84,7 @@ public async Task should_work()
84
84
var result = await Subject . Run ( req , ExecutionContext , "BarQuery" ) ;
85
85
var value = await result . AsAsync < Bar > ( ) ;
86
86
87
- value . Id . Should ( ) . Be ( 1 ) ;
87
+ value ! . Id . Should ( ) . Be ( 1 ) ;
88
88
value . Value . Should ( ) . NotBeEmpty ( ) ;
89
89
}
90
90
@@ -98,11 +98,11 @@ public async Task should_handle_errors()
98
98
await result . ShouldBeErrorAsync ( "The query type 'FailQuery' could not be found" ) ;
99
99
}
100
100
101
- FunctionContext ExecutionContext ;
102
- Query Subject ;
101
+ FunctionContext ExecutionContext = null ! ;
102
+ Query Subject = null ! ;
103
103
}
104
104
105
- static HttpRequestData GetHttpRequestData ( FunctionContext executionContext , string method , string content = null , string url = null )
105
+ static HttpRequestData GetHttpRequestData ( FunctionContext executionContext , string method , string ? content = null , string ? url = null )
106
106
{
107
107
var request = new Mock < HttpRequestData > ( executionContext ) ;
108
108
request . Setup ( r => r . Method ) . Returns ( method ) ;
0 commit comments