Exemplo n.º 1
0
        public MockMarketDownloader SetupDownloadQuotesFiveDays()
        {
            Setup(w => w.DownloadQuotesFiveDays(It.IsAny <string>()))
            .Returns((string tickerSymbol) =>
            {
                var validCompany = GetSupportedCompany(tickerSymbol);
                return(FakeQuotesBuilder.CreateFakeDayQuotes(null, 5));
            });

            return(this);
        }
Exemplo n.º 2
0
        public MockMarketDownloader SetupDownloadQuotesThreeMonths()
        {
            Setup(w => w.DownloadQuotesThreeMonths(It.IsAny <string>()))
            .Returns((string tickerSymbol) =>
            {
                var validCompany = GetSupportedCompany(tickerSymbol);
                return(FakeQuotesBuilder.CreateFakeDayQuotes(null, (int)(SystemTime.Now() - SystemTime.Now().AddMonths(-3)).TotalDays));
            });

            return(this);
        }
Exemplo n.º 3
0
        public MockMarketDownloader SetupDownloadPreviousDayQuote()
        {
            Setup(w => w.DownloadPreviousDayQuote(It.IsAny <string>()))
            .Returns((string tickerSymbol) =>
            {
                var validCompany = GetSupportedCompany(tickerSymbol);
                return(FakeQuotesBuilder.CreateFakeDayQuotes(null, 1).FirstOrDefault());
            });

            return(this);
        }