public void Setup() { wordValidator = Substitute.For <WordValidatable>(); itemLister = Substitute.For <IItemLister>(); goWordValidator = new GoWordValidator(wordValidator, itemLister); wordValidator.IsWord("SUPER").Returns(true); goWords = new List <GoWord>(); }
public AiGoHandler( IAiGridModel aiGridModel, WordFindable wordFinder, IAiGoWordFinder goWordFinder, WordValidatable wordValidator, IGoScorer goScorer, IAiGoPlacer goPlacer) { this.aiGridModel = aiGridModel; this.goWordFinder = goWordFinder; this.wordFinder = wordFinder; this.wordValidator = wordValidator; this.goScorer = goScorer; this.goPlacer = goPlacer; }
public void SetUp() { game = new GameFactory(Substitute.For <IDateTimeOffset>()).NewGame("Player"); game.Players[0].Tiles.Add(new Tile() { Letter = 'A' }); aiGridModel = Substitute.For <IAiGridModel>(); candidates = new List <AiCandidate>(); playerTiles = new List <Tile>(); aiGridModel.Candidates.Returns(candidates); aiGridModel.PlayerTiles.Returns(playerTiles); wordFinder = Substitute.For <WordFindable>(); goWordFinder = Substitute.For <IAiGoWordFinder>(); wordValidator = Substitute.For <WordValidatable>(); goScorer = Substitute.For <IGoScorer>(); goPlacer = Substitute.For <IAiGoPlacer>(); aiGoHandler = new AiGoHandler(aiGridModel, wordFinder, goWordFinder, wordValidator, goScorer, goPlacer); goResult = null; }
public void Setup() { wordValidator = Substitute.For <WordValidatable>(); requestHandler = new IsWordRequestHandler(wordValidator); }
public IsWordRequestHandler(WordValidatable wordValidator) { this.wordValidator = wordValidator; }
public GoWordValidator(WordValidatable wordValidator, IItemLister itemLister) { this.wordValidator = wordValidator; this.itemLister = itemLister; }