public void Setup() { m_Info = new PlayerHandInformation(); IEnumerable <IRule <IPlayerHandInformation> > rules = CreateRules(); m_Repository = new CardsRankRulesRepository(rules); m_Sut = new CardsRankEngine(m_Repository); }
public void BeforeScenario() { var cards = new Dictionary <string, IEnumerable <ICard> >(); var stringToCard = new StringToCardFactory(); stringToCard.Initialize(new CardsBuilder().Cards); var engine = new CardsRankEngine(new CardsRankRulesRepository(new CardsRankRulesBuilder().Rules)); var ranking = new CardsRanking(new PlayerInformationGroupedByStatus(), new SameStatusRankingContainer(new SameStatusRankingBuilder().Rankings)); var phaser = new TexasHoldEm.WinnerPhaser(engine, ranking); ScenarioContext.Current ["Cards"] = cards; ScenarioContext.Current ["StringToCardFactory"] = stringToCard; ScenarioContext.Current ["WinnerPhaser"] = phaser; }
public void BeforeScenario() { var stringToCardRank = new StringToCardRankFactory(); var stringToCard = new StringToCardFactory(); stringToCard.Initialize(new CardsBuilder().Cards); var cards = new List <ICard>(); var info = new PlayerHandInformation { Cards = cards }; var sut = new CardsRankEngine(new CardsRankRulesRepository(new CardsRankRulesBuilder().Rules)); ScenarioContext.Current ["ICards"] = cards; ScenarioContext.Current ["IPlayerHandInformation"] = info; ScenarioContext.Current ["ICardsRankEngine"] = sut; ScenarioContext.Current ["IStringToCardRankFactory"] = stringToCardRank; ScenarioContext.Current ["IStringToCardFactory"] = stringToCard; }