@@ -39,8 +39,8 @@ private static void UseNotImplemented(IApplicationBuilder app)
39
39
[ Fact ]
40
40
public void NullArguments_ArgumentNullException ( )
41
41
{
42
- var builder = new ApplicationBuilder ( serviceProvider : null ) ;
43
- var noMiddleware = new ApplicationBuilder ( serviceProvider : null ) . Build ( ) ;
42
+ var builder = new ApplicationBuilder ( serviceProvider : null ! ) ;
43
+ var noMiddleware = new ApplicationBuilder ( serviceProvider : null ! ) . Build ( ) ;
44
44
var noOptions = new MapOptions ( ) ;
45
45
Assert . Throws < ArgumentNullException > ( ( ) => builder . Map ( "/foo" , configuration : null ! ) ) ;
46
46
Assert . Throws < ArgumentNullException > ( ( ) => new MapMiddleware ( noMiddleware , null ! ) ) ;
@@ -57,7 +57,7 @@ public void NullArguments_ArgumentNullException()
57
57
public async Task PathMatchFunc_BranchTaken ( string matchPath , string basePath , string requestPath )
58
58
{
59
59
HttpContext context = CreateRequest ( basePath , requestPath ) ;
60
- var builder = new ApplicationBuilder ( serviceProvider : null ) ;
60
+ var builder = new ApplicationBuilder ( serviceProvider : null ! ) ;
61
61
builder . Map ( matchPath , UseSuccess ) ;
62
62
var app = builder . Build ( ) ;
63
63
await app . Invoke ( context ) ;
@@ -85,7 +85,7 @@ public async Task PathMatchFunc_BranchTaken(string matchPath, string basePath, s
85
85
public async Task PathMatchAction_BranchTaken ( string matchPath , string basePath , string requestPath )
86
86
{
87
87
HttpContext context = CreateRequest ( basePath , requestPath ) ;
88
- var builder = new ApplicationBuilder ( serviceProvider : null ) ;
88
+ var builder = new ApplicationBuilder ( serviceProvider : null ! ) ;
89
89
builder . Map ( matchPath , subBuilder => subBuilder . Run ( Success ) ) ;
90
90
var app = builder . Build ( ) ;
91
91
await app . Invoke ( context ) ;
@@ -113,7 +113,7 @@ public async Task PathMatchAction_BranchTaken(string matchPath, string basePath,
113
113
public async Task PathMatchAction_BranchTaken_WithPreserveMatchedPathSegment ( string matchPath , string basePath , string requestPath )
114
114
{
115
115
HttpContext context = CreateRequest ( basePath , requestPath ) ;
116
- var builder = new ApplicationBuilder ( serviceProvider : null ) ;
116
+ var builder = new ApplicationBuilder ( serviceProvider : null ! ) ;
117
117
builder . Map ( matchPath , true , subBuilder => subBuilder . Run ( Success ) ) ;
118
118
var app = builder . Build ( ) ;
119
119
await app . Invoke ( context ) ;
@@ -129,7 +129,7 @@ public async Task PathMatchAction_BranchTaken_WithPreserveMatchedPathSegment(str
129
129
[ InlineData ( "/foo/cho/" ) ]
130
130
public void MatchPathWithTrailingSlashThrowsException ( string matchPath )
131
131
{
132
- Assert . Throws < ArgumentException > ( ( ) => new ApplicationBuilder ( serviceProvider : null ) . Map ( matchPath , map => { } ) . Build ( ) ) ;
132
+ Assert . Throws < ArgumentException > ( ( ) => new ApplicationBuilder ( serviceProvider : null ! ) . Map ( matchPath , map => { } ) . Build ( ) ) ;
133
133
}
134
134
135
135
[ Theory ]
@@ -143,7 +143,7 @@ public void MatchPathWithTrailingSlashThrowsException(string matchPath)
143
143
public async Task PathMismatchFunc_PassedThrough ( string matchPath , string basePath , string requestPath )
144
144
{
145
145
HttpContext context = CreateRequest ( basePath , requestPath ) ;
146
- var builder = new ApplicationBuilder ( serviceProvider : null ) ;
146
+ var builder = new ApplicationBuilder ( serviceProvider : null ! ) ;
147
147
builder . Map ( matchPath , UseNotImplemented ) ;
148
148
builder . Run ( Success ) ;
149
149
var app = builder . Build ( ) ;
@@ -165,7 +165,7 @@ public async Task PathMismatchFunc_PassedThrough(string matchPath, string basePa
165
165
public async Task PathMismatchAction_PassedThrough ( string matchPath , string basePath , string requestPath )
166
166
{
167
167
HttpContext context = CreateRequest ( basePath , requestPath ) ;
168
- var builder = new ApplicationBuilder ( serviceProvider : null ) ;
168
+ var builder = new ApplicationBuilder ( serviceProvider : null ! ) ;
169
169
builder . Map ( matchPath , UseNotImplemented ) ;
170
170
builder . Run ( Success ) ;
171
171
var app = builder . Build ( ) ;
@@ -179,7 +179,7 @@ public async Task PathMismatchAction_PassedThrough(string matchPath, string base
179
179
[ Fact ]
180
180
public async Task ChainedRoutes_Success ( )
181
181
{
182
- var builder = new ApplicationBuilder ( serviceProvider : null ) ;
182
+ var builder = new ApplicationBuilder ( serviceProvider : null ! ) ;
183
183
builder . Map ( "/route1" , map =>
184
184
{
185
185
map . Map ( "/subroute1" , UseSuccess ) ;
0 commit comments