public ChooseWordTests() { var roomName = Guid.NewGuid().ToString(); Rooms.RoomsList.Add(roomName, new Room()); _wordList = new List <WordData> { new WordData { Word = "Sheep", Category = WordCategory.Animal }, new WordData { Word = "Plane", Category = WordCategory.Vehicle }, new WordData { Word = "Snowdrop", Category = WordCategory.Plant } }; var shuffleStringHelper = Substitute.For <IShuffleHelper <string> >(); var shuffleWordHelper = Substitute.For <IShuffleHelper <WordData> >(); shuffleWordHelper .ShuffleList(Arg.Any <List <WordData> >()) .Returns(_wordList); var wordCategoryHelper = Substitute.For <IWordCategoryHelper>(); wordCategoryHelper.GetAllWordsWithCategories().Returns(_wordList); _pixenaryManager = new PixenaryManager(shuffleStringHelper, shuffleWordHelper, wordCategoryHelper, roomName); }
public ResetGameTests() { var room = new Room(); room.AddUser("Joshua"); room.AddUser("Lydia"); var roomName = Guid.NewGuid().ToString(); Rooms.RoomsList.Add(roomName, room); var wordList = new List <WordData> { new WordData { Word = "Sheep", Category = WordCategory.Animal }, new WordData { Word = "Plane", Category = WordCategory.Vehicle }, new WordData { Word = "Snowdrop", Category = WordCategory.Plant } }; var shuffleStringHelper = Substitute.For <IShuffleHelper <string> >(); shuffleStringHelper .ShuffleList(Arg.Any <List <string> >()) .Returns(new List <string> { "Joshua", "Lydia" }); var shuffleWordHelper = Substitute.For <IShuffleHelper <WordData> >(); shuffleWordHelper .ShuffleList(Arg.Any <List <WordData> >()) .Returns(wordList); var wordCategoryHelper = Substitute.For <IWordCategoryHelper>(); wordCategoryHelper.GetAllWordsWithCategories().Returns(wordList); _pixenaryManager = new PixenaryManager(shuffleStringHelper, shuffleWordHelper, wordCategoryHelper, roomName); _pixenaryManager.ChooseActivePlayer(); _pixenaryManager.ChooseWord(); _pixenaryManager.CreateNewList(10); _pixenaryManager.UpdatePixel(10, "#ff0000"); }