public void ProcessBattleAction_CallsCooldownUpdater() { //arrange var nextUnit = new BattleUnit { Name = "Testerly" }; mocker.GetMock <INextUnitFinder>().Setup(x => x.GetNextBattleUnit(It.IsAny <Battle>())).Returns(nextUnit); classUnderTest.StartBattle(); //act classUnderTest.ProcessBattleAction(); //assert //twice because StartBattle is used for setup mocker.GetMock <ICooldownUpdater>().Verify(x => x.DecrementCooldownsByNextUnitsCooldown(It.IsAny <Battle>(), nextUnit), Times.Exactly(2)); }
private void button1_Click(object sender, EventArgs e) { battleEngine.ProcessBattleAction(); UpdateBrowserDisplay(); ResetMenus(); }