public void On_Start_PlayerIsNotInPenaltyBox() { var ui = new Ui(); var player = new Player("dummy", ui); var game = new Game(ui, new TestTimer(), GameQuestionsFactory.CreateQuestions(GameRegion.RestOfTheWorld)); game.Add(player); Assert.That(player.IsInPenalty, Is.False); }
public void GivenRegionIsIndia_CategoriesShouldBeHistoryAndNotContainRock() { // Arrange // Act var actualQustion = GameQuestionsFactory.CreateQuestions(GameRegion.India); // Assert actualQustion.Keys.Should().BeEquivalentTo("Pop", "Science", "Sports", "History"); }
public void On_CorrectAnswer_DontEnterPenaltyBox() { var ui = new Ui(); var player = new Player("dummy", ui); var game = new Game(ui, new TestTimer(), GameQuestionsFactory.CreateQuestions(GameRegion.RestOfTheWorld)); game.Add(player); game.Roll(1); game.WasCorrectlyAnswered(); Assert.That(player.IsInPenalty, Is.False); }
public void SetUp() { mUi = new Mock <IUi>(MockBehavior.Loose); mUi.Setup(u => u.PlayerWon(It.IsAny <string>())).Verifiable(); var ui = mUi.Object; mTimer = new TestTimer(); mGame = new Game(ui, new TestTimer(), GameQuestionsFactory.CreateQuestions(GameRegion.RestOfTheWorld)); mPlayer1 = new Player("p1", ui); mGame.Add(mPlayer1); mPlayer2 = new Player("p2", ui); mGame.Add(mPlayer2); }