public void Find_EmptyPriceData__Throws() { Should.Throw <Exception>(() => PricesDataRangeFinder.Find(new StockPricesData(0), StartDate, EndDate)); }
public void Find_SameDatesBelowRange__Throws() { Should.Throw <Exception>(() => PricesDataRangeFinder.Find(_pricesData, StartDate.AddDays(-2), StartDate.AddDays(-2))); }
public void Find_SameDatesAboveRange__Throws() { Should.Throw <Exception>(() => PricesDataRangeFinder.Find(_pricesData, EndDate.AddDays(2), EndDate.AddDays(2))); }
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); }