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()); } }
public void LiteralBooleanToString() { var literal = new JsonLiteral(false); Assert.AreEqual(literal.ToString(), "false"); }
public void LiteralIntToString() { var literal = new JsonLiteral(1); Assert.AreEqual(literal.ToString(), "1"); }
public void LiteralDoubleToString() { var literal = new JsonLiteral(1.1); Assert.AreEqual(literal.ToString(), "1.1"); }
public void LiteralStringToString() { var literal = new JsonLiteral("String Value"); Assert.AreEqual(literal.ToString(), "String Value"); }