public void HumanMakesMove_CorrectGameState(int takes, int remains) { var sut = new SticksGame(10, Player.Human); sut = sut.HumaMakesMove(takes); Assert.That(sut.NumberOfSticks, Is.EqualTo(remains)); Assert.That(sut.Turn, Is.EqualTo(Player.Machine)); }
public void HumanMakesMove_TurnOfMachine_Throws() { var sut = new SticksGame(10, Player.Machine); Assert.Throws <InvalidOperationException>(() => sut.HumaMakesMove(1)); }
public void HumanMakesMove_InvalidNumbersOfSticks_Throws(int take) { var sut = new SticksGame(10, Player.Human); Assert.Throws <ArgumentException>(() => sut.HumaMakesMove(take)); }