Exemplo n.º 1
0
        public void Remove_EffectFromFreshList_ReturnFalse()
        {
            var owner      = Substitute.For <GameLiving>();
            var effectList = new GameEffectList(owner);
            var effect     = Substitute.For <IGameEffect>();

            bool actual = effectList.Remove(effect);

            Assert.AreEqual(false, actual);
        }
Exemplo n.º 2
0
        public void Remove_EffectFromListContainingDifferentEffect_ReturnFalse()
        {
            GameEffectList effectList      = NewGameEffectList();
            var            effect          = NewFakeEffect();
            var            differentEffect = NewFakeEffect();

            effectList.Add(differentEffect);

            bool actual = effectList.Remove(effect);

            Assert.AreEqual(false, actual);
        }
Exemplo n.º 3
0
        public void Remove_EffectFromListContainingDifferentEffect_ReturnFalse()
        {
            GameEffectList effectList      = createEffectListWithValidOwner();
            var            effect          = Substitute.For <IGameEffect>();
            var            differentEffect = Substitute.For <IGameEffect>();

            effectList.Add(differentEffect);

            bool actual = effectList.Remove(effect);

            Assert.AreEqual(false, actual);
        }
Exemplo n.º 4
0
        public void Remove_EffectFromListContainingSameEffect_ListCountIsZero()
        {
            GameEffectList effectList = NewGameEffectList();
            var            effect     = NewFakeEffect();

            effectList.Add(effect);

            effectList.Remove(effect);

            int actual = effectList.Count;

            Assert.AreEqual(0, actual);
        }
Exemplo n.º 5
0
        public void Remove_EffectFromListContainingSameEffect_ListCountIsZero()
        {
            GameEffectList effectList = createEffectListWithValidOwner();
            var            effect     = Substitute.For <IGameEffect>();

            effectList.Add(effect);

            effectList.Remove(effect);

            int actual = effectList.Count;

            Assert.AreEqual(0, actual);
        }
Exemplo n.º 6
0
        public void Remove_EffectFromListContainingSameEffect_ReturnTrue()
        {
            var owner = Substitute.For <GameLiving>();

            owner.IsAlive.Returns(true);
            owner.ObjectState = GameObject.eObjectState.Active;
            var effectList = new GameEffectList(owner);
            var effect     = Substitute.For <IGameEffect>();

            effectList.Add(effect);

            bool actual = effectList.Remove(effect);

            Assert.AreEqual(true, actual);
        }