Ejemplo n.º 1
0
        public void TestAppendStringEmpty()
        {
            var expr = new ArrayExpression();

            var builder = new StringBuilder();

            expr.AppendString(builder);
            Assert.That(builder.ToString(), Is.EqualTo("[]"));
        }
Ejemplo n.º 2
0
        public void TestAppendString()
        {
            var expr = new ArrayExpression();

            expr.Entries.Add(new IntegerConstantExpression(1));
            expr.Entries.Add(new StringConstantExpression("banana"));

            var builder = new StringBuilder();

            expr.AppendString(builder);
            Assert.That(builder.ToString(), Is.EqualTo("[1, \"banana\"]"));
        }