public void Export() { JsonArray a = new JsonArray(new object[] { 123, "Hello World", true }); JsonRecorder writer = new JsonRecorder(); a.Export(writer); JsonReader reader = writer.CreatePlayer(); reader.ReadToken(JsonTokenClass.Array); Assert.AreEqual(a[0], reader.ReadNumber().ToInt32()); Assert.AreEqual(a[1], reader.ReadString()); Assert.AreEqual(a[2], reader.ReadBoolean()); reader.ReadToken(JsonTokenClass.EndArray); }
public void CannotUseNullArgWithExport() { IJsonExportable array = new JsonArray(); array.Export(null, null); }