Esempio n. 1
0
 public GoHandler(
     IGoValidator validator,
     ITileDrawer drawer,
     IGoWordFinder goWordFinder,
     IGoWordValidator goWordValidator,
     IGoScorer goScorer,
     IGoMessageMaker goMessageMaker)
 {
     this.validator       = validator;
     this.drawer          = drawer;
     this.goWordFinder    = goWordFinder;
     this.goWordValidator = goWordValidator;
     this.goScorer        = goScorer;
     this.goMessageMaker  = goMessageMaker;
 }
Esempio n. 2
0
        public void Setup()
        {
            game            = new GameFactory(Substitute.For <IDateTimeOffset>()).NewGame("Player");
            goValidator     = Substitute.For <IGoValidator>();
            drawer          = Substitute.For <ITileDrawer>();
            goWordFinder    = Substitute.For <IGoWordFinder>();
            goWordValidator = Substitute.For <IGoWordValidator>();
            goScorer        = Substitute.For <IGoScorer>();
            goMessageMaker  = Substitute.For <IGoMessageMaker>();
            goHandler       = new GoHandler(goValidator, drawer, goWordFinder, goWordValidator, goScorer, goMessageMaker);
            var goWordValidatorResult = new GoValidationResult()
            {
                IsValid = true
            };

            goWordValidator.ValidateWords(Arg.Any <IEnumerable <GoWord> >()).Returns(goWordValidatorResult);
        }