@@ -23,7 +23,7 @@ public HttpHandlerOptionsCreatorTests()
23
23
}
24
24
25
25
[ Fact ]
26
- public void should_not_use_tracing_if_fake_tracer_registered ( )
26
+ public void Should_not_use_tracing_if_fake_tracer_registered ( )
27
27
{
28
28
var fileRoute = new FileRoute
29
29
{
@@ -42,7 +42,7 @@ public void should_not_use_tracing_if_fake_tracer_registered()
42
42
}
43
43
44
44
[ Fact ]
45
- public void should_use_tracing_if_real_tracer_registered ( )
45
+ public void Should_use_tracing_if_real_tracer_registered ( )
46
46
{
47
47
var fileRoute = new FileRoute
48
48
{
@@ -62,7 +62,7 @@ public void should_use_tracing_if_real_tracer_registered()
62
62
}
63
63
64
64
[ Fact ]
65
- public void should_create_options_with_useCookie_false_and_allowAutoRedirect_true_as_default ( )
65
+ public void Should_create_options_with_useCookie_false_and_allowAutoRedirect_true_as_default ( )
66
66
{
67
67
var fileRoute = new FileRoute ( ) ;
68
68
var expectedOptions = new HttpHandlerOptions ( false , false , false , true , int . MaxValue , DefaultPooledConnectionLifeTime , false ) ;
@@ -74,7 +74,7 @@ public void should_create_options_with_useCookie_false_and_allowAutoRedirect_tru
74
74
}
75
75
76
76
[ Fact ]
77
- public void should_create_options_with_specified_useCookie_and_allowAutoRedirect ( )
77
+ public void Should_create_options_with_specified_useCookie_and_allowAutoRedirect ( )
78
78
{
79
79
var fileRoute = new FileRoute
80
80
{
@@ -95,7 +95,7 @@ public void should_create_options_with_specified_useCookie_and_allowAutoRedirect
95
95
}
96
96
97
97
[ Fact ]
98
- public void should_create_options_with_useproxy_true_as_default ( )
98
+ public void Should_create_options_with_useproxy_true_as_default ( )
99
99
{
100
100
var fileRoute = new FileRoute
101
101
{
@@ -111,7 +111,7 @@ public void should_create_options_with_useproxy_true_as_default()
111
111
}
112
112
113
113
[ Fact ]
114
- public void should_create_options_with_specified_useproxy ( )
114
+ public void Should_create_options_with_specified_useproxy ( )
115
115
{
116
116
var fileRoute = new FileRoute
117
117
{
@@ -130,7 +130,7 @@ public void should_create_options_with_specified_useproxy()
130
130
}
131
131
132
132
[ Fact ]
133
- public void should_create_options_with_specified_MaxConnectionsPerServer ( )
133
+ public void Should_create_options_with_specified_MaxConnectionsPerServer ( )
134
134
{
135
135
var fileRoute = new FileRoute
136
136
{
@@ -149,7 +149,7 @@ public void should_create_options_with_specified_MaxConnectionsPerServer()
149
149
}
150
150
151
151
[ Fact ]
152
- public void should_create_options_fixing_specified_MaxConnectionsPerServer_range ( )
152
+ public void Should_create_options_fixing_specified_MaxConnectionsPerServer_range ( )
153
153
{
154
154
var fileRoute = new FileRoute
155
155
{
@@ -168,7 +168,7 @@ public void should_create_options_fixing_specified_MaxConnectionsPerServer_range
168
168
}
169
169
170
170
[ Fact ]
171
- public void should_create_options_fixing_specified_MaxConnectionsPerServer_range_when_zero ( )
171
+ public void Should_create_options_fixing_specified_MaxConnectionsPerServer_range_when_zero ( )
172
172
{
173
173
var fileRoute = new FileRoute
174
174
{
@@ -187,38 +187,46 @@ public void should_create_options_fixing_specified_MaxConnectionsPerServer_range
187
187
}
188
188
189
189
[ Fact ]
190
+ [ Trait ( "Feat" , "657" ) ]
190
191
public void Should_create_options_with_useDefaultCredentials_false_as_default ( )
191
192
{
193
+ // Arrange
192
194
var fileRoute = new FileRoute
193
195
{
194
- HttpHandlerOptions = new FileHttpHandlerOptions ( ) ,
196
+ HttpHandlerOptions = new ( ) ,
195
197
} ;
196
-
197
- var expectedOptions = new HttpHandlerOptions ( false , false , false , true , int . MaxValue , DefaultPooledConnectionLifeTime , false ) ;
198
-
199
- this . Given ( x => GivenTheFollowing ( fileRoute ) )
200
- . When ( x => WhenICreateHttpHandlerOptions ( ) )
201
- . Then ( x => ThenTheFollowingOptionsReturned ( expectedOptions ) )
202
- . BDDfy ( ) ;
198
+ var expectedOptions = new HttpHandlerOptions ( false , false , false , true , int . MaxValue , DefaultPooledConnectionLifeTime ,
199
+ useDefaultCredentials : false ) ;
200
+ GivenTheFollowing ( fileRoute ) ;
201
+
202
+ // Act
203
+ WhenICreateHttpHandlerOptions ( ) ;
204
+
205
+ // Assert
206
+ ThenTheFollowingOptionsReturned ( expectedOptions ) ;
203
207
}
204
208
205
209
[ Fact ]
206
- public void Should_create_options_with_useDefaultCredentials_true_if_set ( )
210
+ [ Trait ( "Feat" , "657" ) ]
211
+ public void Should_create_options_with_UseDefaultCredentials_true_if_set ( )
207
212
{
213
+ // Arrange
208
214
var fileRoute = new FileRoute
209
215
{
210
- HttpHandlerOptions = new FileHttpHandlerOptions
216
+ HttpHandlerOptions = new ( )
211
217
{
212
218
UseDefaultCredentials = true ,
213
219
} ,
214
220
} ;
221
+ var expectedOptions = new HttpHandlerOptions ( false , false , false , true , int . MaxValue , DefaultPooledConnectionLifeTime ,
222
+ useDefaultCredentials : true ) ;
223
+ GivenTheFollowing ( fileRoute ) ;
215
224
216
- var expectedOptions = new HttpHandlerOptions ( false , false , false , true , int . MaxValue , DefaultPooledConnectionLifeTime , true ) ;
225
+ // Act
226
+ WhenICreateHttpHandlerOptions ( ) ;
217
227
218
- this . Given ( x => GivenTheFollowing ( fileRoute ) )
219
- . When ( x => WhenICreateHttpHandlerOptions ( ) )
220
- . Then ( x => ThenTheFollowingOptionsReturned ( expectedOptions ) )
221
- . BDDfy ( ) ;
228
+ // Assert
229
+ ThenTheFollowingOptionsReturned ( expectedOptions ) ;
222
230
}
223
231
224
232
private void GivenTheFollowing ( FileRoute fileRoute )
@@ -244,7 +252,6 @@ private void ThenTheFollowingOptionsReturned(HttpHandlerOptions expected)
244
252
245
253
private void GivenARealTracer ( )
246
254
{
247
- var tracer = new FakeTracer ( ) ;
248
255
_serviceCollection . AddSingleton < ITracer , FakeTracer > ( ) ;
249
256
_serviceProvider = _serviceCollection . BuildServiceProvider ( ) ;
250
257
_httpHandlerOptionsCreator = new HttpHandlerOptionsCreator ( _serviceProvider ) ;
0 commit comments