public void TestGetAllScoresBetfair() { var allMarkets = new AllMarkets(); allMarkets.GetAllMarkets(TypeDBO.BetFair); if (allMarkets.ParsingInfo.AllMarketsHashSet == null) { Assert.Fail("Null information from Betfair"); } if (allMarkets.ParsingInfo.AllMarketsHashSet.Count == 0) { Assert.Fail("(Count = 0) information from Betfair"); } foreach (var market in allMarkets.ParsingInfo.AllMarketsHashSet) { allMarkets.GetScoreMarket(market.BetfairEventId, TypeDBO.BetFair); if ((market.Player1.ScoreBetfair1 == null) && (market.Player1.ScoreBetfair1 == "")) { Assert.Fail("Score error from betfair"); } if ((market.Player2.ScoreBetfair1 == null) && (market.Player2.ScoreBetfair1 == "")) { Assert.Fail("Score error from betfair"); } } }
public void TestScrapeScorePageSkyBet() { var allmarkets = new AllMarkets(); var result = allmarkets.GetAllMarkets(TypeDBO.SkyBet); if (result == false) { Assert.Fail("No info [market == null]"); } if (allmarkets.ParsingInfo.AllMarketsHashSet.Count == 0) { Assert.Fail("No elems from parse. Maybee no inplay games?"); } foreach (var marketInfo in allmarkets.ParsingInfo.AllMarketsHashSet) { if (marketInfo.SkyBetEventId == null) { Assert.Fail("No info eventId from skybet"); } var statusScore = allmarkets.GetScoreMarket(marketInfo.SkyBetEventId, TypeDBO.SkyBet); if (statusScore == false) { Assert.Fail("No info result from skybet"); } if (marketInfo.Player1 == null) { Assert.Fail("No info about player1 in some markets"); } if (marketInfo.Player1 == null) { Assert.Fail("No info about player2 in some markets"); } if ((marketInfo.Player1.ScoreSkyBet == null) || (marketInfo.Player1.ScoreSkyBet == "")) { Debug.WriteLine("ScoreBet366:" + marketInfo.Player2.ScoreBet366); Debug.WriteLine("ScoreBetfair:" + marketInfo.Player2.ScoreBetfair1); Assert.Fail("No info about score1 one in some markets"); } if ((marketInfo.Player2.ScoreSkyBet == null) || (marketInfo.Player2.ScoreSkyBet == "")) { Debug.WriteLine("ScoreBet366:" + marketInfo.Player2.ScoreBet366); Debug.WriteLine("ScoreBetfair:" + marketInfo.Player2.ScoreBetfair1); Assert.Fail("No info about score2 one in some markets"); } if (marketInfo.MarketName.Length < 4) { Assert.Fail("No info about player1 in some markets"); } } Debug.WriteLine("In-plays markets: " + allmarkets.ParsingInfo.AllMarketsHashSet.Count); }
public void TestGetAllInfoBetfair() { var allMarkets = new AllMarkets(); allMarkets.GetAllMarkets(TypeDBO.BetFair); if (allMarkets.ParsingInfo.AllMarketsHashSet == null) { Assert.Fail("Null information from Betfair"); } if (allMarkets.ParsingInfo.AllMarketsHashSet.Count == 0) { Assert.Fail("(Count = 0) information from Betfair"); } Debug.WriteLine("Count get's elems from bet365 = " + allMarkets.ParsingInfo.AllMarketsHashSet.Count); }
public void TestGetAllInformationBet365() { var startTime = DateTime.Now; var allMarkets = new AllMarkets(); allMarkets.GetAllMarkets(TypeDBO.Bet365); if (allMarkets.ParsingInfo.AllMarketsHashSet == null) { Assert.Fail("Null information from Bet365"); } if (allMarkets.ParsingInfo.AllMarketsHashSet.Count == 0) { Assert.Fail("(Count = 0) information from Bet365"); } var endTime = DateTime.Now; Debug.WriteLine("Time for get info: " + (startTime - endTime).TotalSeconds); Debug.WriteLine("Count get's elems from bet365 = " + allMarkets.ParsingInfo.AllMarketsHashSet.Count); }
public void TestGetAllScoreBet365() { var startTime = DateTime.Now; var allMarkets = new AllMarkets(); //var threadControl = new ThreadControl(allMarkets); allMarkets.GetAllMarkets(TypeDBO.Bet365); if (allMarkets.ParsingInfo.AllMarketsHashSet == null) { Assert.Fail("Null information from Bet365"); } if (allMarkets.ParsingInfo.AllMarketsHashSet.Count == 0) { Assert.Fail("(Count = 0) information from Bet365"); } foreach (var market in allMarkets.ParsingInfo.AllMarketsHashSet) { if (market.MarketName == null) { Debug.WriteLine("MarketName is null!!! "); continue; } if (market.Bet365EventId == null) { Debug.WriteLine("Empty Event id, market: " + market.MarketName); continue; } allMarkets.GetScoreMarket(market.Bet365EventId, TypeDBO.Bet365); if ((market.Player1.ScoreBet366 == null) && (market.Player1.ScoreBet366 == "")) { Assert.Fail("Score error from bet365"); } if ((market.Player2.ScoreBet366 == null) && (market.Player2.ScoreBet366 == "")) { Assert.Fail("Score error from bet365"); } Thread.Sleep(100); } var endTime = DateTime.Now; Debug.WriteLine("Time for get info: " + (startTime - endTime).TotalMilliseconds); }
public void TestScrapeTennisPageSkybet() { var allmarkets = new AllMarkets(); var result = allmarkets.GetAllMarkets(TypeDBO.SkyBet); if (result == false) { Assert.Fail("No info [market == null]"); } if (allmarkets.ParsingInfo.AllMarketsHashSet.Count == 0) { Assert.Fail("No elems from parse. Maybee no inplay games?"); } foreach (var marketInfo in allmarkets.ParsingInfo.AllMarketsHashSet) { if (marketInfo.Player1 == null) { Assert.Fail("No info about player1 in some markets"); } if (marketInfo.Player2 == null) { Assert.Fail("No info about player2 in some markets"); } if (marketInfo.MarketName.Length < 4) { Assert.Fail("No info about player1 in some markets"); } } Debug.WriteLine("Elems from skyBet: " + allmarkets.ParsingInfo.AllMarketsHashSet.Count); Debug.WriteLine("Names of players: "); foreach (var market in allmarkets.ParsingInfo.AllMarketsHashSet) { Debug.WriteLine(market.Player1.Name + " : " + market.Player2.Name); } Debug.WriteLine(""); }