public void InsertNewQuotesToDbTest()
        {
            this.BuildCalcuatorFactory();
            var latestDataPointDate = monday.AddDays(1);
            this.dataPointRepo.Setup(m => m.FindLatestDataPointDateForSymbol("SGP.L")).Returns(latestDataPointDate);
            this.yahooServiceClient.Setup(m => m.GetQuotes("SGP.L")).Returns(TestQuotes);

            var service = new DataPointManagementService(this.dataPointRepo.Object, this.yahooServiceClient.Object, this.calculatorFactory.Object);
            service.InsertNewQuotesToDb("SGP.L");

            var expectedDataPoints = TestQuotes.Where(q => q.Date > latestDataPointDate).Select(DataPoints.CreateFromQuote).ToList();

            for (var i = 0; i <= 4; i++)
            {
                this.dataPointRepo.Verify(m => m.InsertAll(It.Is<List<DataPoints>>(d => d[i].Equals(expectedDataPoints[i]))));
            }
        }
        public void QuotesFoundButUpToDateDbTest()
        {
            this.dataPointRepo.Setup(m => m.FindLatestDataPointDateForSymbol("SGP.L")).Returns(monday.AddDays(6));
            this.yahooServiceClient.Setup(m => m.GetQuotes("SGP.L")).Returns(TestQuotes);

            var service = new DataPointManagementService(this.dataPointRepo.Object, this.yahooServiceClient.Object, this.calculatorFactory.Object);
            service.InsertNewQuotesToDb("SGP.L");

            this.dataPointRepo.Verify(m => m.InsertAll(It.IsAny<IEnumerable<DataPoints>>()), Times.Never);
        }