public static HtmlNode GetCorrectScoreMarketNodeWithoutMarketName() { string html = @" <div> <div> <div class='marketTable__header___mSHxT' title='Correct map score'>Test Name</div> </div> <div class='scoreMarketRow__container___1n55P_correct_score_with_values'> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='2:1'>2:1</div> <button class='__app-Odd-button odd__button___2eiZg'> <div class='__app-Odd-inner odd__inner___3F_cm'> <div class='odd__ellipsis___3b4Yk'>2.25</div> </div> </button> </div> </div> </div> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='1:2'>1:2</div> <button class='__app-Odd-button odd__button___2eiZg'> <div class='__app-Odd-inner odd__inner___3F_cm'> <div class='odd__ellipsis___3b4Yk'>1.6</div> </div> </button> </div> </div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetHandicapMarketNodeWithSuspendedOdd() { string html = @" <div> <div> <div> <div class='marketTable__header___mSHxT' title='Map handicap'>Map handicap</div> </div> <div class='tableMarketRow__container___3jeni_handicap_with_values'> <div class='tableMarketRow__column___2kCi8'> <div class='marketRowOddTable__container___TfWHU'> <div class='marketRowOddTable__title-wrapper___1JryI' title='-1.5'> <span>-1.5</span> </div> <div class='marketRowOddTable__odd-wrapper___lWDBZ'> <div title='Deactivated' class='__app-Odd-is-disabled odd__is-disabled___bCpHE'></div> </div> </div> </div> <div class='tableMarketRow__column___2kCi8'> <div class='marketRowOddTable__container___TfWHU'> <div class='marketRowOddTable__title-wrapper___1JryI' title='-1.5'> <span>-1.5</span> </div> <div class='marketRowOddTable__odd-wrapper___lWDBZ'> <button class='__app-Odd-button odd__button___2eiZg'>1.18</button> </div> </div> </div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetHandicapMarketNodeWithoutValues() { string html = @" <div> <div> <div> <div class='marketTable__header___mSHxT' title='Map handicap'>Map handicap</div> </div> <div class='tableMarketRow__container___3jeni_handicap_with_values'> <div class='tableMarketRow__column___2kCi8'> <div class='marketRowOddTable__container___TfWHU'> <div class='marketRowOddTable__title-wrapper___1JryI' title='-1.5'> <span>-1.5</span> </div> </div> </div> <div class='tableMarketRow__column___2kCi8'> <div class='marketRowOddTable__container___TfWHU'> <div class='marketRowOddTable__title-wrapper___1JryI' title='1.5'> <span>1.5</span> </div> </div> </div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetHandicapMarketNodeWithMissingMarketName() { string html = @" <div> <div> <div> <div class='marketTable__header___mSHxT' title='Map handicap'>Test Name</div> </div> <div class='tableMarketRow__container___3jeni_handicap_with_values'> <div class='tableMarketRow__column___2kCi8'> <div class='marketRowOddTable__container___TfWHU'> <div class='marketRowOddTable__title-wrapper___1JryI' title='-1.5'> <span>-1.5</span> </div> <div class='marketRowOddTable__odd-wrapper___lWDBZ'> <button class='__app-Odd-button odd__button___2eiZg'>5.18</button> </div> </div> </div> <div class='tableMarketRow__column___2kCi8'> <div class='marketRowOddTable__container___TfWHU'> <div class='marketRowOddTable__title-wrapper___1JryI' title='1.5'> <span>1.5</span> </div> <div class='marketRowOddTable__odd-wrapper___lWDBZ'> <button class='__app-Odd-button odd__button___2eiZg'>1.18</button> </div> </div> </div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetCorrectScoreMarketNodeWithoutValues() { string html = @" <div> <div> <div class='marketTable__header___mSHxT' title='Correct map score'>Correct map score</div> </div> <div class='scoreMarketRow__container___1n55P_correct_score_with_values'> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='2:1'>2:1</div> </div> </div> </div> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='1:2'>1:2</div> </div> </div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public void GetTwoWayOdddsCountShouldReturnZeroCountWhenMarketNodeIsInvalid() { HtmlNode marketNode = HtmlNodesLoader.Load("<div></div>"); int count = htmlService.GetTwoWayOddsCount(marketNode); Assert.AreEqual(0, count); }
public void GetTwoWayOdddsCountShouldReturnOneCountWhenMarketNodeHasOneChildNode() { HtmlNode marketNode = HtmlNodesLoader.Load("<div><div class='tableMarketRow__container___3jeni'><div class='tableMarketRow__odd-wrapper___3nnKr'></div<</div></div>"); int count = htmlService.GetTwoWayOddsCount(marketNode); Assert.AreEqual(1, count); }
public static HtmlNode GetCorrectScoreMarketNodeWithOneSuspendedOdd() { string html = @" <div> <div> <div class='marketTable__header___mSHxT' title='Correct map score'>Correct map score</div> </div> <div class='scoreMarketRow__container___1n55P_correct_score_with_values'> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='2:1'>2:1</div> <div class='tableMarketRow__odd-wrapper___3nnKr'> <div title='Deactivated' class='__app-Odd-is-disabled odd__is-disabled___bCpHE'></div> </div> </div> </div> </div> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='1:2'>1:2</div> <button class='__app-Odd-button odd__button___2eiZg'> <div class='__app-Odd-inner odd__inner___3F_cm'> <div class='odd__ellipsis___3b4Yk'>1.6</div> </div> </button> </div> </div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public void GetTwoWayOdddsCountShouldReturnZeroCountWhenMarketNodeDoesNotHaveChildNodes() { HtmlNode marketNode = HtmlNodesLoader.Load("<div><div class='tableMarketRow__container___3jeni'></div></div>"); int count = htmlService.GetTwoWayOddsCount(marketNode); Assert.AreEqual(0, count); }
public static HtmlNode GetCorrectScoreMarketNodeWithOneResultedOdd() { string html = @" <div> <div> <div class='marketTable__header___mSHxT' title='Correct map score'>Correct map score</div> </div> <div class='scoreMarketRow__container___1n55P'> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='2:1'>2:1</div> <div class='tableMarketRow__odd-wrapper___3nnKr'> <div class='odd__result___1K5vV'>Win</div> </div> </div> </div> </div> <div class='scoreMarketRow__column___2OuUC'> <div class='scoreMarketRow__odd-wrapper___3g5qT'> <div class='__app-Odd-title odd__title___1kZ6V' title='1:2'>1:2</div> <div class='tableMarketRow__odd-wrapper___3nnKr'> <div class='odd__result___1K5vV'>Loss</div> </div> </div> </div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public void IsSuspendedShouldReturnFalseWhenOddNodeIsInvalid() { HtmlNode oddNode = HtmlNodesLoader.Load("<div></div>"); bool isSuspended = htmlService.IsSuspended(oddNode); Assert.IsFalse(isSuspended); }
public void HasHeaderShouldReturnTrueWhenMarketNodeHasValidClass() { HtmlNode marketNode = HtmlNodesLoader.Load("<div><div class='tableMarketRow__specifier-value___3S715'></div></div>"); bool hasHeader = htmlService.HasHeader(marketNode); Assert.IsTrue(hasHeader); }
public void HasHeaderShouldReturnFalseWhenMarketNodeIsInvalid() { HtmlNode marketNode = HtmlNodesLoader.Load("<div></div>"); bool hasHeader = htmlService.HasHeader(marketNode); Assert.IsFalse(hasHeader); }
public void GetOddResultStatusShouldReturnWinWhenOddNodeContainsInnerTextWinInLowerCase() { HtmlNode oddNode = HtmlNodesLoader.Load("<div><div class='odd__result___1K5vV'>win</div></div>"); OddResultFeedStatus status = htmlService.GetOddResultStatus(oddNode); Assert.AreEqual(OddResultFeedStatus.Win, status); }
public void GetOddResultStatusShouldReturnNotResultedWhenOddNodeDoesNotContainInnerText() { HtmlNode oddNode = HtmlNodesLoader.Load("<div><div class='odd__result___1K5vV'></div></div>"); OddResultFeedStatus status = htmlService.GetOddResultStatus(oddNode); Assert.AreEqual(OddResultFeedStatus.NotResulted, status); }
public void IsSuspendedShouldReturnTrueWhenOddNodeContainsValidTitleAndClass() { HtmlNode oddNode = HtmlNodesLoader.Load("<div title='Deactivated' class='__app-Odd-is-disabled'></div>"); bool isSuspended = htmlService.IsSuspended(oddNode); Assert.IsTrue(isSuspended); }
public void GetOddNamesShouldReturnNullWhenMarketNodeDOesNotHaveParentNode() { HtmlNode marketNode = HtmlNodesLoader.Load("<div class='tableColumnNames__column___-zFNK'></div>"); IEnumerable <string> oddNames = htmlService.GetOddNames(marketNode); Assert.IsTrue(oddNames == null); }
public void GetShouldReturnTournamentWithNameWhenMatchInfoContainsInnerText() { HtmlNode matchInfo = HtmlNodesLoader.Load("<div><div class='__app-PromoMatchBody-tournament promoMatchBody__tournament___1M0Aj'>TournamentName</div></div>"); TournamentFeedModel tournament = tournamentsProvider.Get(matchInfo); Assert.IsFalse(string.IsNullOrEmpty(tournament.Name)); }
public void GetShouldReturnTournamentWithoutNameWhenMatchInfoIsInvalid() { HtmlNode matchInfo = HtmlNodesLoader.Load("<div></div>"); TournamentFeedModel tournament = tournamentsProvider.Get(matchInfo); Assert.IsTrue(string.IsNullOrEmpty(tournament.Name)); }
public void GetShouldReturnNullWhenMatchContainerIsInvalid() { HtmlNode matchContainer = HtmlNodesLoader.Load("<div></div>"); IEnumerable <TeamFeedModel> teams = teamsProvider.Get(matchContainer); Assert.AreEqual(null, teams); }
public void IsSuspendedShouldReturnFalseWhenOddNodeContainsValidTitleButDoesNotContainValidClass() { HtmlNode oddNode = HtmlNodesLoader.Load("<div title='Deactivated'></div>"); bool isSuspended = htmlService.IsSuspended(oddNode); Assert.IsFalse(isSuspended); }
public void GetOddNamesShouldReturnOneOddNameWhenMarketNodeHasParentNodeAndValidClass() { HtmlNode marketNode = HtmlNodesLoader.Load("<div><div class='tableColumnNames__column___-zFNK'></div></div>"); IList <string> oddNames = htmlService.GetOddNames(marketNode); Assert.AreEqual(1, oddNames.Count); }
public void IsSuspendedShouldReturnFalseWhenOddNodeDoesNotContainValidTitleButContainsValidClass() { HtmlNode oddNode = HtmlNodesLoader.Load("<div title='InvalidTitle' class='__app-Odd-is-disabled'></div>"); bool isSuspended = htmlService.IsSuspended(oddNode); Assert.IsFalse(isSuspended); }
public void GetOddResultStatusShouldReturnNotResultedWhenOddNodeIsInvalid() { HtmlNode oddNode = HtmlNodesLoader.Load("<div></div>"); OddResultFeedStatus status = htmlService.GetOddResultStatus(oddNode); Assert.AreEqual(OddResultFeedStatus.NotResulted, status); }
public void GetOddNamesShouldReturnNullWhenMarketNodeHasInvalidClass() { HtmlNode marketNode = HtmlNodesLoader.Load("<div></div>"); IEnumerable <string> oddNames = htmlService.GetOddNames(marketNode); Assert.IsTrue(oddNames == null); }
public static HtmlNode GetInvalidMatchContainerWithOnlyOneTeam() { string html = @" <div> <div class='__app-PromoMatchBody-competitor-name promoMatchBody__competitor-name___3IM6A'>Antrophy</div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetValidMatchContainerWithTeamsWithoutScores() { string html = @" <div> <div class='__app-PromoMatchBody-competitor-name promoMatchBody__competitor-name___3IM6A'>Antrophy</div> <div class='__app-PromoMatchBody-competitor-name promoMatchBody__competitor-name___3IM6A'>The Prime</div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetMarketNodeWithOneOdd() { string html = @" <div> <div> <div class='tableMarketRow__container___3jeni_one_odd'> <div class='tableMarketRow__odd-wrapper___3nnKr'></div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetTwoWayMarketOddWithoutValues() { string html = @" <div> <div> <div class='tableMarketRow__container___3jeni_two_odds'> <div class='tableMarketRow__odd-wrapper___3nnKr'></div> <div class='tableMarketRow__odd-wrapper___3nnKr'></div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }
public static HtmlNode GetTwoWayMarketNodeWithHeaders() { string html = @" <div> <div> <div class='tableMarketRow__container___3jeni_two_odds'> <div title='1' class='tableMarketRow__specifier-value___3S715'>1</div> <div class='tableMarketRow__odd-wrapper___3nnKr'></div> <div title='2' class='tableMarketRow__specifier-value___3S715'>2</div> <div class='tableMarketRow__odd-wrapper___3nnKr'></div> </div> </div> </div>"; return(HtmlNodesLoader.Load(html)); }