@@ -18,15 +18,15 @@ public void Can_Not_Be_Added_To_GET_Request()
1818
1919 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
2020 {
21- var client = new RestClient ( BASE_URL ) ;
22- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
21+ RestClient client = new RestClient ( BASE_URL ) ;
22+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
2323
2424 const string contentType = "text/plain" ;
2525 const string bodyData = "abc123 foo bar baz BING!" ;
2626
2727 request . AddParameter ( contentType , bodyData , ParameterType . RequestBody ) ;
2828
29- var resetEvent = new ManualResetEvent ( false ) ;
29+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
3030
3131 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
3232 resetEvent . WaitOne ( ) ;
@@ -42,10 +42,9 @@ public void Can_Have_No_Body_Added_To_POST_Request()
4242
4343 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
4444 {
45- var client = new RestClient ( BASE_URL ) ;
46- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
47-
48- var resetEvent = new ManualResetEvent ( false ) ;
45+ RestClient client = new RestClient ( BASE_URL ) ;
46+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
47+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
4948
5049 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
5150 resetEvent . WaitOne ( ) ;
@@ -61,15 +60,15 @@ public void Can_Be_Added_To_POST_Request()
6160
6261 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
6362 {
64- var client = new RestClient ( BASE_URL ) ;
65- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
63+ RestClient client = new RestClient ( BASE_URL ) ;
64+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
6665
6766 const string contentType = "text/plain" ;
6867 const string bodyData = "abc123 foo bar baz BING!" ;
6968
7069 request . AddParameter ( contentType , bodyData , ParameterType . RequestBody ) ;
7170
72- var resetEvent = new ManualResetEvent ( false ) ;
71+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
7372
7473 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
7574 resetEvent . WaitOne ( ) ;
@@ -85,15 +84,15 @@ public void Can_Be_Added_To_PUT_Request()
8584
8685 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
8786 {
88- var client = new RestClient ( BASE_URL ) ;
89- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
87+ RestClient client = new RestClient ( BASE_URL ) ;
88+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
9089
9190 const string contentType = "text/plain" ;
9291 const string bodyData = "abc123 foo bar baz BING!" ;
9392
9493 request . AddParameter ( contentType , bodyData , ParameterType . RequestBody ) ;
9594
96- var resetEvent = new ManualResetEvent ( false ) ;
95+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
9796
9897 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
9998 resetEvent . WaitOne ( ) ;
@@ -109,15 +108,15 @@ public void Can_Be_Added_To_DELETE_Request()
109108
110109 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
111110 {
112- var client = new RestClient ( BASE_URL ) ;
113- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
111+ RestClient client = new RestClient ( BASE_URL ) ;
112+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
114113
115114 const string contentType = "text/plain" ;
116115 const string bodyData = "abc123 foo bar baz BING!" ;
117116
118117 request . AddParameter ( contentType , bodyData , ParameterType . RequestBody ) ;
119118
120- var resetEvent = new ManualResetEvent ( false ) ;
119+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
121120
122121 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
123122 resetEvent . WaitOne ( ) ;
@@ -133,15 +132,15 @@ public void Can_Not_Be_Added_To_HEAD_Request()
133132
134133 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
135134 {
136- var client = new RestClient ( BASE_URL ) ;
137- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
135+ RestClient client = new RestClient ( BASE_URL ) ;
136+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
138137
139138 const string contentType = "text/plain" ;
140139 const string bodyData = "abc123 foo bar baz BING!" ;
141140
142141 request . AddParameter ( contentType , bodyData , ParameterType . RequestBody ) ;
143142
144- var resetEvent = new ManualResetEvent ( false ) ;
143+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
145144
146145 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
147146 resetEvent . WaitOne ( ) ;
@@ -157,15 +156,15 @@ public void Can_Be_Added_To_OPTIONS_Request()
157156
158157 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
159158 {
160- var client = new RestClient ( BASE_URL ) ;
161- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
159+ RestClient client = new RestClient ( BASE_URL ) ;
160+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
162161
163162 const string contentType = "text/plain" ;
164163 const string bodyData = "abc123 foo bar baz BING!" ;
165164
166165 request . AddParameter ( contentType , bodyData , ParameterType . RequestBody ) ;
167166
168- var resetEvent = new ManualResetEvent ( false ) ;
167+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
169168
170169 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
171170 resetEvent . WaitOne ( ) ;
@@ -181,15 +180,15 @@ public void Can_Be_Added_To_PATCH_Request()
181180
182181 using ( SimpleServer . Create ( BASE_URL , Handlers . Generic < RequestBodyCapturer > ( ) ) )
183182 {
184- var client = new RestClient ( BASE_URL ) ;
185- var request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
183+ RestClient client = new RestClient ( BASE_URL ) ;
184+ RestRequest request = new RestRequest ( RequestBodyCapturer . RESOURCE , httpMethod ) ;
186185
187186 const string contentType = "text/plain" ;
188187 const string bodyData = "abc123 foo bar baz BING!" ;
189188
190189 request . AddParameter ( contentType , bodyData , ParameterType . RequestBody ) ;
191190
192- var resetEvent = new ManualResetEvent ( false ) ;
191+ ManualResetEvent resetEvent = new ManualResetEvent ( false ) ;
193192
194193 client . ExecuteAsync ( request , response => resetEvent . Set ( ) ) ;
195194 resetEvent . WaitOne ( ) ;
@@ -224,7 +223,7 @@ private class RequestBodyCapturer
224223
225224 public static void Capture ( HttpListenerContext context )
226225 {
227- var request = context . Request ;
226+ HttpListenerRequest request = context . Request ;
228227
229228 CapturedContentType = request . ContentType ;
230229 CapturedHasEntityBody = request . HasEntityBody ;
@@ -233,7 +232,7 @@ public static void Capture(HttpListenerContext context)
233232
234233 private static string StreamToString ( Stream stream )
235234 {
236- var streamReader = new StreamReader ( stream ) ;
235+ StreamReader streamReader = new StreamReader ( stream ) ;
237236 return streamReader . ReadToEnd ( ) ;
238237 }
239238 }
0 commit comments