Beispiel #1
0
            public void LiteralToStringMethod(object l)
            {
                var lit = new JsonLiteral(l);

                if (l is bool)
                {
                    Assert.AreEqual(lit.ToString(), l.ToString().ToLower());
                }
                else
                {
                    Assert.AreEqual(lit.ToString(), l.ToString());
                }
            }
Beispiel #2
0
            public void LiteralBooleanToString()
            {
                var literal = new JsonLiteral(false);

                Assert.AreEqual(literal.ToString(), "false");
            }
Beispiel #3
0
            public void LiteralIntToString()
            {
                var literal = new JsonLiteral(1);

                Assert.AreEqual(literal.ToString(), "1");
            }
Beispiel #4
0
            public void LiteralDoubleToString()
            {
                var literal = new JsonLiteral(1.1);

                Assert.AreEqual(literal.ToString(), "1.1");
            }
Beispiel #5
0
            public void LiteralStringToString()
            {
                var literal = new JsonLiteral("String Value");

                Assert.AreEqual(literal.ToString(), "String Value");
            }