@@ -47,12 +47,12 @@ public void ShowTeams_TestList_EqualLists()
4747 It . IsAny < string > ( ) , It . IsAny < int > ( ) ) )
4848 . Returns ( xmlTestList ) ;
4949
50- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
50+ var footballController = new FootballController ( mockXmlReq . Object ) ;
5151 TeamsLastUpdateTime = DateTime . MinValue ;
5252 LastUpdateTime = DateTime . MinValue ;
5353
5454 // Act
55- ViewResult viewResult = footballController . Teams ( ) as ViewResult ;
55+ var viewResult = footballController . Teams ( ) as ViewResult ;
5656
5757 // Assert
5858 mockXmlReq . Verify ( x => x . GetAllTeamsByLeagueAndSeason (
@@ -61,7 +61,7 @@ public void ShowTeams_TestList_EqualLists()
6161 // Checking if list forwarded as a model (viewResult.Model) to View
6262 // corresponds to test list (Does this list have the same values of their objects? )
6363
64- List < FootballTeam > dbList = viewResult . Model as List < FootballTeam > ;
64+ var dbList = viewResult . Model as List < FootballTeam > ;
6565
6666 Assert . IsNotNull ( dbList ) ;
6767 Assert . AreEqual ( xmlTestList . Count , numberOfTeams ) ;
@@ -85,12 +85,12 @@ public void ShowTeams_EmptyXmlList_ViewMessage()
8585 It . IsAny < string > ( ) , It . IsAny < int > ( ) ) )
8686 . Returns ( xmlTestList ) ;
8787
88- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
88+ var footballController = new FootballController ( mockXmlReq . Object ) ;
8989 TeamsLastUpdateTime = DateTime . MinValue ;
9090 LastUpdateTime = DateTime . MinValue ;
9191
9292 // Act
93- ViewResult viewResult = footballController . Teams ( ) as ViewResult ;
93+ var viewResult = footballController . Teams ( ) as ViewResult ;
9494
9595 // Assert
9696 mockXmlReq . Verify ( x => x . GetAllTeamsByLeagueAndSeason (
@@ -112,7 +112,7 @@ public void ShowTeams_StringLengthOutOfRange_EntityValidationException()
112112 It . IsAny < string > ( ) , It . IsAny < int > ( ) ) )
113113 . Returns ( xmlTestList ) ;
114114
115- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
115+ var footballController = new FootballController ( mockXmlReq . Object ) ;
116116 TeamsLastUpdateTime = DateTime . MinValue ;
117117 LastUpdateTime = DateTime . MinValue ;
118118
@@ -140,10 +140,10 @@ public void ShowTeams_VariousControllerArgs_ProperArgumentsCall()
140140 x => x . GetAllTeamsByLeagueAndSeason ( leagueIdExample , seasonYearExample ) ,
141141 } ;
142142
143- Mock < IXmlSoccerRequester > mockXmlReq =
143+ var mockXmlReq =
144144 SetSequenceOfMockCalls < List < XMLSoccerCOM . Team > > ( xmlTestList , callMockExpressions ) ;
145145
146- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
146+ var footballController = new FootballController ( mockXmlReq . Object ) ;
147147 TeamsLastUpdateTime = DateTime . MinValue ;
148148 LastUpdateTime = DateTime . MinValue ;
149149
@@ -166,12 +166,12 @@ public void ShowTeams_RecentlyUpdatedList_NoRequestInvocation()
166166 // Arrange
167167 var mockXmlReq = new Mock < IXmlSoccerRequester > ( ) ;
168168
169- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
169+ var footballController = new FootballController ( mockXmlReq . Object ) ;
170170 TeamsLastUpdateTime = DateTime . UtcNow ;
171171 LastUpdateTime = DateTime . UtcNow ;
172172
173173 // Act
174- ViewResult viewResult = footballController . Teams ( ) as ViewResult ;
174+ var viewResult = footballController . Teams ( ) as ViewResult ;
175175
176176 // Assert
177177 mockXmlReq . Verify ( x => x . GetAllTeamsByLeagueAndSeason (
@@ -189,12 +189,12 @@ public void ShowTable_TestTable_EqualTables()
189189 It . IsAny < string > ( ) , It . IsAny < int > ( ) ) )
190190 . Returns ( xmlTestList ) ;
191191
192- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
192+ var footballController = new FootballController ( mockXmlReq . Object ) ;
193193 TableLastUpdateTime = DateTime . MinValue ;
194194 LastUpdateTime = DateTime . MinValue ;
195195
196196 // Act
197- ViewResult viewResult = footballController . Table ( ) as ViewResult ;
197+ var viewResult = footballController . Table ( ) as ViewResult ;
198198
199199 // Assert
200200 mockXmlReq . Verify ( x => x . GetLeagueStandingsBySeason (
@@ -203,7 +203,7 @@ public void ShowTable_TestTable_EqualTables()
203203 // Checking if list forwarded as a model (viewResult.Model) to View
204204 // corresponds to test list (Does this list have the same values of their objects?)
205205
206- List < TeamLeagueStanding > dbList = viewResult . Model as List < TeamLeagueStanding > ;
206+ var dbList = viewResult . Model as List < TeamLeagueStanding > ;
207207
208208 Assert . IsNotNull ( dbList ) ;
209209 Assert . AreEqual ( xmlTestList . Count , numberOfTeams ) ;
@@ -225,12 +225,12 @@ public void ShowTable_EmptyXmlList_ViewMessage()
225225 It . IsAny < string > ( ) , It . IsAny < int > ( ) ) )
226226 . Returns ( xmlTestList ) ;
227227
228- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
228+ var footballController = new FootballController ( mockXmlReq . Object ) ;
229229 TableLastUpdateTime = DateTime . MinValue ;
230230 LastUpdateTime = DateTime . MinValue ;
231231
232232 // Act
233- ViewResult viewResult = footballController . Table ( ) as ViewResult ;
233+ var viewResult = footballController . Table ( ) as ViewResult ;
234234
235235 // Assert
236236 mockXmlReq . Verify ( x => x . GetLeagueStandingsBySeason (
@@ -252,7 +252,7 @@ public void ShowTable_StringLengthOutOfRange_EntityValidationException()
252252 It . IsAny < string > ( ) , It . IsAny < int > ( ) ) )
253253 . Returns ( xmlTestList ) ;
254254
255- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
255+ var footballController = new FootballController ( mockXmlReq . Object ) ;
256256 TableLastUpdateTime = DateTime . MinValue ;
257257 LastUpdateTime = DateTime . MinValue ;
258258
@@ -281,11 +281,11 @@ public void ShowTable_VariousControllerArgs_ProperArgumentsCall()
281281 x => x . GetLeagueStandingsBySeason ( leagueIdExample , seasonYearExample ) ,
282282 } ;
283283
284- Mock < IXmlSoccerRequester > mockXmlReq =
284+ var mockXmlReq =
285285 SetSequenceOfMockCalls < List < XMLSoccerCOM . TeamLeagueStanding > > (
286286 xmlTestLeagueTable , callMockExpressions ) ;
287287
288- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
288+ var footballController = new FootballController ( mockXmlReq . Object ) ;
289289 TableLastUpdateTime = DateTime . MinValue ;
290290 LastUpdateTime = DateTime . MinValue ;
291291
@@ -308,12 +308,12 @@ public void ShowTable_RecentlyUpdatedTable_NoRequestInvocation()
308308 // Arrange
309309 var mockXmlReq = new Mock < IXmlSoccerRequester > ( ) ;
310310
311- FootballController footballController = new FootballController ( mockXmlReq . Object ) ;
311+ var footballController = new FootballController ( mockXmlReq . Object ) ;
312312 TableLastUpdateTime = DateTime . UtcNow ;
313313 LastUpdateTime = DateTime . UtcNow ;
314314
315315 // Act
316- ViewResult viewResult = footballController . Teams ( ) as ViewResult ;
316+ var viewResult = footballController . Teams ( ) as ViewResult ;
317317
318318 // Assert
319319 mockXmlReq . Verify ( x => x . GetLeagueStandingsBySeason (
@@ -339,7 +339,7 @@ private XMLSoccerCOM.Team CreateTestTeam(int team_Id, string testString)
339339 int size ,
340340 string testString = standardString )
341341 {
342- List < XMLSoccerCOM . Team > xmlList = new List < XMLSoccerCOM . Team > ( ) ;
342+ var xmlList = new List < XMLSoccerCOM . Team > ( ) ;
343343 for ( int i = 1 ; i <= size ; i ++ )
344344 {
345345 xmlList . Add ( CreateTestTeam ( i , testString ) ) ;
@@ -372,8 +372,7 @@ private XMLSoccerCOM.TeamLeagueStanding CreateTestTeamLeagueStanding(
372372 string testString = standardString ,
373373 int testInt = 0 )
374374 {
375- List < XMLSoccerCOM . TeamLeagueStanding > xmlList =
376- new List < XMLSoccerCOM . TeamLeagueStanding > ( ) ;
375+ var xmlList = new List < XMLSoccerCOM . TeamLeagueStanding > ( ) ;
377376
378377 for ( int i = 1 ; i <= size ; i ++ )
379378 {
@@ -388,7 +387,7 @@ private Mock<IXmlSoccerRequester> SetSequenceOfMockCalls<T>(
388387 {
389388 var mockXmlReq = new Mock < IXmlSoccerRequester > ( MockBehavior . Strict ) ;
390389
391- MockSequence sequence = new MockSequence ( ) ;
390+ var sequence = new MockSequence ( ) ;
392391
393392 foreach ( var expression in CallMockExpressions )
394393 {
0 commit comments