Example #1
0
        public void WriteFalseBoolean()
        {
            var writer = new JsonImportingWriter();

            writer.WriteBoolean(false);
            Assert.AreEqual(false, GetSingleValue(writer));
        }
        public void WriteTrueBoolean()
        {
            JsonImportingWriter writer = new JsonImportingWriter();

            writer.WriteBoolean(true);
            Assert.AreEqual(true, GetSingleValue(writer));
        }
 public void WriteArray()
 {
     JsonImportingWriter writer = new JsonImportingWriter();
     writer.WriteStartArray();
     writer.WriteNumber(123);
     writer.WriteString("Hello World");
     writer.WriteBoolean(true);
     writer.WriteEndArray();
     Assert.AreEqual(new object[] { new JsonNumber("123"), "Hello World", true }, GetArray(writer));
 }
Example #4
0
        public void WriteArray()
        {
            var writer = new JsonImportingWriter();

            writer.WriteStartArray();
            writer.WriteNumber(123);
            writer.WriteString("Hello World");
            writer.WriteBoolean(true);
            writer.WriteEndArray();
            Assert.AreEqual(new object[] { new JsonNumber("123"), "Hello World", true }, GetArray(writer));
        }
 public void WriteFalseBoolean()
 {
     JsonImportingWriter writer = new JsonImportingWriter();
     writer.WriteBoolean(false);
     Assert.AreEqual(false, GetSingleValue(writer));
 }