예제 #1
0
        public async Task MutualFundScraping_02()
        {
            var sut = new EtfQuoteScraper();

            var htmlDocument = new HtmlDocument();

            var fileText = await File.ReadAllTextAsync("TestPages\\Etf02.txt");

            htmlDocument.LoadHtml(fileText);

            var quoteData = sut.Scrape(htmlDocument, new CultureInfo("es-ES"));

            quoteData.Quote.Should().Be(57.8f);
            quoteData.Date.Should().Be("17/11/2017");
        }
예제 #2
0
        public void ShouldNotHandleIncorrectFundType()
        {
            var sut = new EtfQuoteScraper();

            sut.HandlesFundType("mf").Should().BeFalse();
        }
예제 #3
0
        public void ShouldHandleCorrectFundType()
        {
            var sut = new EtfQuoteScraper();

            sut.HandlesFundType("etf").Should().BeTrue();
        }