public void TestDoDamage() { // AAA = Arrange - Act - Assert MockData data = new MockData(); PlayerControler cut = new PlayerControler(new MockView(), data); cut.DoDamage(20); if (data.HP != 0) { throw new Exception(); } }
public void OnMouseDown() { ctrl.DoDamage(); }