public void Setup() { IEnumerable <ICard> cards = CreateCards(); m_Sut = new StringToCardFactory(); m_Sut.Initialize(cards); }
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; }