Exemplo n.º 1
0
        public void Integration_GetCurrentPosition_ShouldReturnEnumerableOfPositions()
        {
            var screenScrapper = new ScreenScapper();
            var context = new InvestmentDbContextProvider();
            var positionRepository = new PositionRepository(context);
            var sut = new PositionService(positionRepository, screenScrapper);

            var actual = sut.GetCurrentPosition();

            Assert.AreEqual(17, actual.ToList().Count);
        }
Exemplo n.º 2
0
 public async Task GetPrice_WithAudUsd_ShouldReturnLotsOfMoneySmilingFace()
 {
     var sut = new ScreenScapper();
     var price = await sut.GetYahooPrice("AUDUSD=X");
     Assert.AreEqual(0.7100, price);
 }
Exemplo n.º 3
0
 public async Task GetPrice_WithCba_ShouldReturnLotsOfMoneySmilingFace()
 {
     var sut = new ScreenScapper();
     var price = await sut.GetYahooPrice("CBA.AX");
     Assert.AreEqual(74.20, price);
 }
Exemplo n.º 4
0
        public async Task ScreenScapper_DoWork_Blah()
        {
            var sut = new ScreenScapper();
            await sut.DoWork("http://www.asx.com.au/asx/statistics/prevBusDayAnns.do");

        }