예제 #1
0
        public void PREventEffect_ParseFromString()
        {
            PREventEffect pree       = new PREventEffect(PREventEffect.PR_EFFECT_TAG + ":" + PlayerCharacter.HEALTH + ":0:0:Test Result");
            String        expectedPR = PlayerCharacter.HEALTH + ":0";

            Assert.AreEqual(0, pree.GetMinimum(), "The min should be 0");
            Assert.AreEqual(0, pree.GetMaximum(), "The max should be 0");
            Assert.AreEqual(expectedPR, pree.GetResource().ParseToString(), "The string should match the expected value");
        }
예제 #2
0
        public void PREventEffect_StandardConstructor()
        {
            PREventEffect pree       = new PREventEffect();
            String        expectedPR = PlayerCharacter.HEALTH + ":0";

            Assert.AreEqual(0, pree.GetMinimum(), "The min should be 0");
            Assert.AreEqual(0, pree.GetMaximum(), "The max should be 0");
            Assert.AreEqual(expectedPR, pree.GetResource().ParseToString(), "The string should match the expected value");
        }
예제 #3
0
        public void PREventEffect_ParseToString()
        {
            String        expected   = PREventEffect.PR_EFFECT_TAG + ":" + PlayerCharacter.HEALTH + ":10:20:Test Result";
            PREventEffect pree       = new PREventEffect(expected);
            String        expectedPR = PlayerCharacter.HEALTH + ":10";

            Assert.AreEqual(10, pree.GetMinimum(), "The min should be 10");
            Assert.AreEqual(20, pree.GetMaximum(), "The max should be 20");
            Assert.AreEqual(expectedPR, pree.GetResource().ParseToString(), "The string should match the expected value");
            Assert.AreEqual(expected, pree.ParseToString(), "String should be " + expected);
        }