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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 4
0
        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());
        }
Ejemplo n.º 7
0
        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());
        }
Ejemplo n.º 8
0
        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());
        }
Ejemplo n.º 9
0
        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);
        }
Ejemplo n.º 10
0
        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 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());
        }