@@ -192,30 +192,40 @@ private static TestCaseData[] CanonicalOptionIntradayHistoryTestCases
192192 var twx = Symbol . Create ( "TWX" , SecurityType . Equity , Market . USA ) ;
193193 var twxOption = Symbol . CreateCanonicalOption ( twx ) ;
194194
195+ var spx = Symbol . Create ( "SPX" , SecurityType . Index , Market . USA ) ;
196+ var spxwOption = Symbol . CreateCanonicalOption ( spx , Market . USA , null ) ;
197+
195198 return
196199 [
197- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 ) , ( DateTime ? ) null ) ,
198- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 ) , new DateTime ( 2014 , 06 , 05 ) ) ,
199- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 ) , new DateTime ( 2014 , 06 , 06 ) ) ,
200- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 0 , 0 , 0 ) , new DateTime ( 2014 , 06 , 05 , 15 , 0 , 0 ) ) ,
201- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 05 , 15 , 0 , 0 ) ) ,
202- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 06 ) ) ,
203- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 06 , 10 , 0 , 0 ) ) ,
204- new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 06 , 15 , 0 , 0 ) )
200+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 ) , ( DateTime ? ) null , Resolution . Minute ) ,
201+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 ) , new DateTime ( 2014 , 06 , 05 ) , Resolution . Minute ) ,
202+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 ) , new DateTime ( 2014 , 06 , 06 ) , Resolution . Minute ) ,
203+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 0 , 0 , 0 ) , new DateTime ( 2014 , 06 , 05 , 15 , 0 , 0 ) , Resolution . Minute ) ,
204+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 05 , 15 , 0 , 0 ) , Resolution . Minute ) ,
205+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 06 ) , Resolution . Minute ) ,
206+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 06 , 10 , 0 , 0 ) , Resolution . Minute ) ,
207+ new TestCaseData ( twxOption , new DateTime ( 2014 , 06 , 05 , 10 , 0 , 0 ) , new DateTime ( 2014 , 06 , 06 , 15 , 0 , 0 ) , Resolution . Minute ) ,
208+
209+ new TestCaseData ( spxwOption , new DateTime ( 2021 , 01 , 04 ) , ( DateTime ? ) null , Resolution . Hour ) ,
210+ new TestCaseData ( spxwOption , new DateTime ( 2021 , 01 , 04 ) , new DateTime ( 2021 , 01 , 04 ) , Resolution . Hour ) ,
211+ new TestCaseData ( spxwOption , new DateTime ( 2021 , 01 , 04 ) , new DateTime ( 2021 , 01 , 05 ) , Resolution . Hour ) ,
212+ new TestCaseData ( spxwOption , new DateTime ( 2021 , 01 , 04 , 10 , 0 , 0 ) , new DateTime ( 2021 , 01 , 04 , 15 , 0 , 0 ) , Resolution . Hour ) ,
213+ new TestCaseData ( spxwOption , new DateTime ( 2021 , 01 , 04 , 10 , 0 , 0 ) , new DateTime ( 2021 , 01 , 05 , 15 , 0 , 0 ) , Resolution . Hour ) ,
214+ new TestCaseData ( spxwOption , new DateTime ( 2021 , 01 , 14 , 10 , 0 , 0 ) , new DateTime ( 2021 , 01 , 14 , 15 , 0 , 0 ) , Resolution . Hour ) ,
205215 ] ;
206216 }
207217 }
208218
209219 [ TestCaseSource ( nameof ( CanonicalOptionIntradayHistoryTestCases ) ) ]
210- public void CanonicalOptionIntradayQuantBookHistoryWithIntradayRange ( Symbol canonicalOption , DateTime start , DateTime ? end )
220+ public void CanonicalOptionIntradayQuantBookHistoryWithIntradayRange ( Symbol canonicalOption , DateTime start , DateTime ? end , Resolution resolution )
211221 {
212222 var quantBook = new QuantBook ( ) ;
213223 var historyProvider = new TestHistoryProvider ( quantBook . HistoryProvider ) ;
214224 quantBook . SetHistoryProvider ( historyProvider ) ;
215225 quantBook . SetStartDate ( ( end ?? start ) . Date . AddDays ( 1 ) ) ;
216226
217227 var option = quantBook . AddSecurity ( canonicalOption ) ;
218- var history = quantBook . OptionHistory ( canonicalOption , start , end , Resolution . Minute ) ;
228+ var history = quantBook . OptionHistory ( canonicalOption , start , end , resolution ) ;
219229
220230 Assert . Greater ( history . Count , 0 ) ;
221231
0 commit comments