Exemple #1
0
 public void before()
 {
     collection = new ModifierCollection();
     mul        = new TestMutiModifier(2);
     add        = new TestAdditionModifier(5);
     pres       = new TestPresModifier(50);
 }
Exemple #2
0
        public void negetivePresModifier()
        {
            TestPresModifier pres = new TestPresModifier(-50);

            collection.add(pres);
            float ans = collection.calc(stat);

            Assert.AreEqual(2.5, ans);
        }
Exemple #3
0
        public void allModifier()
        {
            TestAdditionModifier add  = new TestAdditionModifier(5);
            TestMutiModifier     mul  = new TestMutiModifier(2);
            TestPresModifier     pres = new TestPresModifier(50);

            collection.add(add);
            collection.add(mul);
            collection.add(pres);

            float ans = collection.calc(stat);

            Assert.AreEqual(30, ans);
        }