public void TestExclusiveInfect() { PlayerMock player = new PlayerMock(); DiseaseListMock list = new DiseaseListMock(player); list.TryInfect(Diseases.MOLASSES); list.AssertInfected(Diseases.MOLASSES); list.TryInfect(Diseases.CRACK); list.AssertInfected(Diseases.CRACK); list.AssertNotInfected(Diseases.MOLASSES); list.TryInfect(Diseases.MOLASSES); list.AssertInfected(Diseases.MOLASSES); list.AssertNotInfected(Diseases.CRACK); list.TryInfect(Diseases.CONSTIPATION); list.AssertInfected(Diseases.CONSTIPATION); list.TryInfect(Diseases.POOPS); list.AssertInfected(Diseases.POOPS); list.AssertNotInfected(Diseases.CONSTIPATION); list.TryInfect(Diseases.CONSTIPATION); list.AssertInfected(Diseases.CONSTIPATION); list.AssertNotInfected(Diseases.POOPS); }
public void TestExclusiveInfect() { PlayerMock player = new PlayerMock(); DiseaseListMock list = new DiseaseListMock(player); list.TryInfect(Diseases.MOLASSES); list.AssertInfected(Diseases.MOLASSES); list.TryInfect(Diseases.CRACK); list.AssertInfected(Diseases.CRACK); list.AssertNotInfected(Diseases.MOLASSES); list.TryInfect(Diseases.MOLASSES); list.AssertInfected(Diseases.MOLASSES); list.AssertNotInfected(Diseases.CRACK); list.TryInfect(Diseases.CONSTIPATION); list.AssertInfected(Diseases.CONSTIPATION); list.TryInfect(Diseases.POOPS); list.AssertInfected(Diseases.POOPS); list.AssertNotInfected(Diseases.CONSTIPATION); list.TryInfect(Diseases.CONSTIPATION); list.AssertInfected(Diseases.CONSTIPATION); list.AssertNotInfected(Diseases.POOPS); }
public void TestCrackPoops() { PlayerMock player = new PlayerMock(); DiseaseListMock list = new DiseaseListMock(player); list.TryInfect(Diseases.CRACKPOOPS); list.AssertInfected(Diseases.CRACK); list.AssertInfected(Diseases.POOPS); }
public void TestCrackPoops() { PlayerMock player = new PlayerMock(); DiseaseListMock list = new DiseaseListMock(player); list.TryInfect(Diseases.CRACKPOOPS); list.AssertInfected(Diseases.CRACK); list.AssertInfected(Diseases.POOPS); }
public void TestCrack() { List<String> result = new List<String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.CRACK; list.TryInfect(disease); Assert.AreEqual(CVars.cg_playerSpeedCrack.floatValue, player.GetSpeed()); list.TryCure(disease); Assert.AreEqual(CVars.cg_playerSpeed.floatValue, player.GetSpeed()); }
public void TestConstipation() { List<String> result = new List<String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.CONSTIPATION; list.TryInfect(disease); Assert.IsFalse(player.TryAction()); list.TryCure(disease); Assert.IsTrue(player.TryAction()); }
public void TestMolasses() { List <String> result = new List <String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.MOLASSES; list.TryInfect(disease); Assert.AreEqual(CVars.cg_playerSpeedMolasses.floatValue, player.GetSpeed()); list.TryCure(disease); Assert.AreEqual(CVars.cg_playerSpeed.floatValue, player.GetSpeed()); }
public void TestConstipation() { List <String> result = new List <String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.CONSTIPATION; list.TryInfect(disease); Assert.IsFalse(player.TryAction()); list.TryCure(disease); Assert.IsTrue(player.TryAction()); }
public void TestShortFuze() { List <String> result = new List <String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.SHORTFUZE; list.TryInfect(disease); Bomb bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_fuzeTimeShort.floatValue, 1000 * bomb.timeRemains); bomb.Deactivate(); // hack list.TryCure(disease); bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_fuzeTimeNormal.floatValue, 1000 * bomb.timeRemains); }
public void TestShortFlame() { List <String> result = new List <String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.SHORTFLAME; list.TryInfect(disease); Bomb bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_bombShortFlame.intValue, bomb.GetRadius()); bomb.Deactivate(); // hack list.TryCure(disease); bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_initFlame.intValue, bomb.GetRadius()); }
public void TestInfect() { List <String> result = new List <String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseList(player); bool infected = list.TryInfect(Diseases.MOLASSES); Assert.IsTrue(infected); infected = list.TryInfect(Diseases.MOLASSES); Assert.IsFalse(infected); AssertResult(result, Infected(Diseases.MOLASSES)); Disease disease = DiseaseList.DiseaseForType(Diseases.MOLASSES); list.Update(disease.duration); AssertResult(result, Infected(Diseases.MOLASSES), Cured(Diseases.MOLASSES)); }
public DiseaseListMock(PlayerMock player) : base(player) { player.SetDiseaseList(this); }
public void TestShortFuze() { List<String> result = new List<String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.SHORTFUZE; list.TryInfect(disease); Bomb bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_fuzeTimeShort.floatValue, 1000 * bomb.timeRemains); bomb.Deactivate(); // hack list.TryCure(disease); bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_fuzeTimeNormal.floatValue, 1000 * bomb.timeRemains); }
public void TestShortFlame() { List<String> result = new List<String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseListMock(player); Diseases disease = Diseases.SHORTFLAME; list.TryInfect(disease); Bomb bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_bombShortFlame.intValue, bomb.GetRadius()); bomb.Deactivate(); // hack list.TryCure(disease); bomb = player.GetNextBomb(); Assert.AreEqual(CVars.cg_initFlame.intValue, bomb.GetRadius()); }
public void TestInfect() { List<String> result = new List<String>(); PlayerMock player = new PlayerMock(result); DiseaseList list = new DiseaseList(player); bool infected = list.TryInfect(Diseases.MOLASSES); Assert.IsTrue(infected); infected = list.TryInfect(Diseases.MOLASSES); Assert.IsFalse(infected); AssertResult(result, Infected(Diseases.MOLASSES)); Disease disease = DiseaseList.DiseaseForType(Diseases.MOLASSES); list.Update(disease.duration); AssertResult(result, Infected(Diseases.MOLASSES), Cured(Diseases.MOLASSES)); }
public DiseaseListMock(PlayerMock player) : base(player) { player.SetDiseaseList(this); }