@@ -154,7 +154,7 @@ public void Should_return_kills_stats_correctly()
154154 }
155155
156156 [ Fact ]
157- public void Should_return_map_info_correctly ( )
157+ public void Should_return_map_info_correctly_for_defuse_maps ( )
158158 {
159159 // Arrange
160160
@@ -168,6 +168,99 @@ public void Should_return_map_info_correctly()
168168 allStats . mapInfo . TestType . ShouldBe ( "Defuse" ) ;
169169 }
170170
171+ [ Fact ]
172+ public void Should_return_map_info_correctly_for_hostage_maps ( )
173+ {
174+ // Arrange
175+ var ProcessedData2 = ProcessedData ;
176+ ProcessedData2 . DemoInformation = new DemoInformation ( )
177+ {
178+ DemoName = "demo2" ,
179+ MapName = "de_testmap2" ,
180+ TestDate = new DateTime ( 2020 , 1 , 1 , 0 , 0 , 0 ) . ToString ( ) ,
181+ TestType = "Hostage" ,
182+ } ;
183+ ProcessedData2 . MatchStartValues = new List < MatchStartedEventArgs > ( )
184+ {
185+ new MatchStartedEventArgs
186+ {
187+ Mapname = "de_testmap2" ,
188+ HasBombsites = false ,
189+ }
190+ } ;
191+
192+ // Act
193+ AllStats allStats = MatchData . CreateFiles ( ProcessedData , false ) ;
194+
195+ // Assess
196+ allStats . mapInfo . DemoName . ShouldBe ( "demo2" ) ;
197+ allStats . mapInfo . MapName . ShouldBe ( "de_testmap2" ) ;
198+ allStats . mapInfo . TestDate . ShouldBe ( new DateTime ( 2020 , 1 , 1 , 0 , 0 , 0 ) . ToString ( ) ) ;
199+ allStats . mapInfo . TestType . ShouldBe ( "Hostage" ) ;
200+ }
201+
202+ [ Fact ]
203+ public void Should_return_map_info_correctly_for_wingman_defuse_maps ( )
204+ {
205+ // Arrange
206+ var ProcessedData3 = ProcessedData ;
207+ ProcessedData3 . DemoInformation = new DemoInformation ( )
208+ {
209+ DemoName = "demo3" ,
210+ MapName = "de_testmap3" ,
211+ TestDate = new DateTime ( 2020 , 1 , 1 , 0 , 0 , 0 ) . ToString ( ) ,
212+ TestType = "Wingman" ,
213+ } ;
214+ ProcessedData3 . MatchStartValues = new List < MatchStartedEventArgs > ( )
215+ {
216+ new MatchStartedEventArgs
217+ {
218+ Mapname = "de_testmap3" ,
219+ HasBombsites = true ,
220+ }
221+ } ;
222+
223+ // Act
224+ AllStats allStats = MatchData . CreateFiles ( ProcessedData , false ) ;
225+
226+ // Assess
227+ allStats . mapInfo . DemoName . ShouldBe ( "demo3" ) ;
228+ allStats . mapInfo . MapName . ShouldBe ( "de_testmap3" ) ;
229+ allStats . mapInfo . TestDate . ShouldBe ( new DateTime ( 2020 , 1 , 1 , 0 , 0 , 0 ) . ToString ( ) ) ;
230+ allStats . mapInfo . TestType . ShouldBe ( "Wingman" ) ;
231+ }
232+
233+ [ Fact ]
234+ public void Should_return_map_info_correctly_for_wingman_hostage_maps ( )
235+ {
236+ // Arrange
237+ var ProcessedData3 = ProcessedData ;
238+ ProcessedData3 . DemoInformation = new DemoInformation ( )
239+ {
240+ DemoName = "demo4" ,
241+ MapName = "de_testmap4" ,
242+ TestDate = new DateTime ( 2020 , 1 , 1 , 0 , 0 , 0 ) . ToString ( ) ,
243+ TestType = "Wingman" ,
244+ } ;
245+ ProcessedData3 . MatchStartValues = new List < MatchStartedEventArgs > ( )
246+ {
247+ new MatchStartedEventArgs
248+ {
249+ Mapname = "de_testmap4" ,
250+ HasBombsites = false ,
251+ }
252+ } ;
253+
254+ // Act
255+ AllStats allStats = MatchData . CreateFiles ( ProcessedData , false ) ;
256+
257+ // Assess
258+ allStats . mapInfo . DemoName . ShouldBe ( "demo4" ) ;
259+ allStats . mapInfo . MapName . ShouldBe ( "de_testmap4" ) ;
260+ allStats . mapInfo . TestDate . ShouldBe ( new DateTime ( 2020 , 1 , 1 , 0 , 0 , 0 ) . ToString ( ) ) ;
261+ allStats . mapInfo . TestType . ShouldBe ( "Wingman" ) ;
262+ }
263+
171264 [ Fact ]
172265 public void Should_return_player_stats_correctly ( )
173266 {
@@ -344,7 +437,7 @@ public void Should_return_version_number_correctly()
344437 AllStats allStats = MatchData . CreateFiles ( ProcessedData , false ) ;
345438
346439 // Assess
347- allStats . versionNumber . Version . ShouldBe ( "1.1.13 " ) ;
440+ allStats . versionNumber . Version . ShouldBe ( "1.1.14 " ) ;
348441 }
349442
350443 [ Fact ]
0 commit comments