예제 #1
0
        public void SerializeString(string value, string expected)
        {
            var stringNode = new StringLiteral (value);

            var stringSql = stringNode.Walk (new Sqlizer (foobarTable()));

            Assert.AreEqual (expected, stringSql);
        }
예제 #2
0
        public void CheckStringDoesNothing()
        {
            var str = new StringLiteral ("baz");

            var result = str.Walk (new RefChecker (), new [] { "Foobar" });

            Assert.AreEqual (1, result.Length);
            Assert.Contains ("Foobar", result);
        }
예제 #3
0
        public void CheckStringLiterals()
        {
            var stringNode = new StringLiteral ("foobar");

            var type = stringNode.Walk (new TypeChecker());

            Assert.AreEqual (SpecType.String, type.Type);
        }