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>();
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
 public void Setup()
 {
     wordValidator  = Substitute.For <WordValidatable>();
     requestHandler = new IsWordRequestHandler(wordValidator);
 }
Esempio n. 5
0
 public IsWordRequestHandler(WordValidatable wordValidator)
 {
     this.wordValidator = wordValidator;
 }
Esempio n. 6
0
 public GoWordValidator(WordValidatable wordValidator, IItemLister itemLister)
 {
     this.wordValidator = wordValidator;
     this.itemLister    = itemLister;
 }