public UncheckedWordTests()
        {
            _shuffleHelper     = Substitute.For <IShuffleHelper <string> >();
            _scoreHelper       = Substitute.For <IScoreHelper>();
            _categoriesInitial = new List <string> {
                "Animal", "Colour", "Bird", "News", "Food", "Boat", "Plane", "Car", "Fruit"
            };
            _categoriesShuffled = new List <string> {
                "Food", "Fruit", "Colour", "Car", "Animal", "Plane", "Boat", "Bird", "News"
            };

            _shuffleHelper = Substitute.For <IShuffleHelper <string> >();
            _shuffleHelper
            .ShuffleList(_categoriesInitial)
            .Returns(_categoriesShuffled);

            _userThoughtsAndCrosses = new UserThoughtsAndCrosses(_scoreHelper, _shuffleHelper);

            _userThoughtsAndCrosses.CreateGrid(_categoriesInitial);

            _userThoughtsAndCrosses.CheckWord("News");
            _userThoughtsAndCrosses.CheckWord("Food");
            _userThoughtsAndCrosses.CheckWord("Fruit");
            _userThoughtsAndCrosses.CheckWord("Bird");
            _userThoughtsAndCrosses.CheckWord("Car");
            _userThoughtsAndCrosses.CheckWord("Animal");
            _userThoughtsAndCrosses.CheckWord("Boat");
            _userThoughtsAndCrosses.CheckWord("Plane");
            _userThoughtsAndCrosses.CheckWord("Colour");
        }
示例#2
0
 public GameManager(IJoinRoomHelper joinRoomHelper, IShuffleHelper <string> shuffleHelper, IScoreHelper scoreHelper, IFilenameHelper filenameHelper, IWordService wordService)
 {
     _joinRoomHelper = joinRoomHelper;
     _shuffleHelper  = shuffleHelper;
     _scoreHelper    = scoreHelper;
     _filenameHelper = filenameHelper;
     _wordService    = wordService;
 }
示例#3
0
 public GameService(IUnitOfWork unitOfWork, IScoreHelper scoreHelper, ICardsHelper cardsHelper)
 {
     this._unitOfWork = unitOfWork;
     _scoreHelper     = scoreHelper;
     _cardsHelper     = cardsHelper;
 }
示例#4
0
 public void SetUp()
 {
     scoreHelper = new ScoreHelper();
 }