public void test_Health_and_Dead_change_State() { agent.hitted(101); Assert.AreEqual(dead.GetType(), agent.getState().GetType()); Assert.AreEqual(MIN_HP, agent.getHP(), "Test heal(Health -> Dead)"); agent.heal(80); Assert.AreEqual(health.GetType(), agent.getState().GetType()); }
public void test_Injured_and_Dead_change_State() { agent.hitted(31); Assert.AreEqual(injured.GetType(), agent.getState().GetType()); agent.hitted(70); Assert.AreEqual(dead.GetType(), agent.getState().GetType()); Assert.AreEqual(MIN_HP, agent.getHP(), "Test heal(Injured -> Dead)"); agent.heal(1); Assert.AreEqual(dying.GetType(), agent.getState().GetType()); }
public void test_Health_and_Injured_change_State() { agent.hitted(30); Assert.AreEqual(health.GetType(), agent.getState().GetType()); agent.hitted(1); Assert.AreEqual(injured.GetType(), agent.getState().GetType()); agent.heal(80); Assert.AreEqual(health.GetType(), agent.getState().GetType()); Assert.AreEqual(MAX_HP, agent.getHP(), "Test heal(Injured -> Health)"); }
public void test_default_state_when_game_start() { Assert.IsNotNull(agent.getState()); Assert.AreEqual(health.GetType(), agent.getState().GetType(), "Test default state is Health"); Assert.AreEqual(MAX_HP, agent.getHP(), "Test default HP is MAX_HP"); }