Exemplo n.º 1
0
        public void SanitizerTestSanitizeSimpleCompoundStat()
        {
            string expression = "10+STR/4";

            string[] expected = { "10", "+", LConstants.GET_PROP_F, "(", MockPlayer.Key, "STR", ")", "/", "4" };
            Token[]  actual   = SanitizerInstance.ReplaceProperties(Tokenizer.Tokenize(expression), MockPlayer);
            Assert.AreEqual(expected.Length, actual.Length);
            for (int i = 0; i < actual.Length; ++i)
            {
                Assert.AreEqual(expected[i], actual[i].Value);
            }
        }