Example #1
0
 public void Find_EmptyPriceData__Throws()
 {
     Should.Throw <Exception>(() => PricesDataRangeFinder.Find(new StockPricesData(0), StartDate, EndDate));
 }
Example #2
0
 public void Find_SameDatesBelowRange__Throws()
 {
     Should.Throw <Exception>(() => PricesDataRangeFinder.Find(_pricesData, StartDate.AddDays(-2), StartDate.AddDays(-2)));
 }
Example #3
0
 public void Find_SameDatesAboveRange__Throws()
 {
     Should.Throw <Exception>(() => PricesDataRangeFinder.Find(_pricesData, EndDate.AddDays(2), EndDate.AddDays(2)));
 }
Example #4
0
 private void TestFindInRange(DateTime findFrom, DateTime findTo, int expectedFrom, int expectedTo)
 {
     var(resFrom, resTo) = PricesDataRangeFinder.Find(_pricesData, findFrom, findTo);
     resFrom.ShouldBe(expectedFrom);
     resTo.ShouldBe(expectedTo);
 }