コード例 #1
0
        public void TestGetSupportedParenthesis()
        {
            List <string> ops = PredefinedTokens.GetSupportedParenthesis();

            string expected = "( )";
            string actual   = string.Join(" ", ops.ToArray());

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void TestPredefinedConstants()
        {
            List <string> constants = PredefinedTokens.GetPredefinedConstants();

            string expected = "true false";
            string actual   = string.Join(" ", constants.ToArray());

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void TestGetPredefinedTokens()
        {
            List <string> tokens = PredefinedTokens.GetPredefinedTokens();

            string expected = "always depth maxDepth noMaxDepth isArray cardinality.minimum cardinality.maximum referenceOnly normalized structured";
            string actual   = string.Join(" ", tokens.ToArray());

            Assert.AreEqual(expected, actual);
        }
コード例 #4
0
        public void TestGetSupportedOperators()
        {
            List <string> ops = PredefinedTokens.GetSupportedOperators();

            // all expect the '!' operator since that is tagged separately
            string expected = "&& || > < == != >= <=";
            string actual   = string.Join(" ", ops.ToArray());

            Assert.AreEqual(expected, actual);
        }