public void CannotReadPartialRecording() { var recorder = new JsonRecorder(); recorder.WriteStartArray(); recorder.CreatePlayer(); }
public void AutoCompletion() { JsonRecorder writer = new JsonRecorder(); writer.WriteStartArray(); writer.WriteStartObject(); writer.WriteMember("outer"); writer.WriteStartObject(); writer.WriteMember("inner"); writer.AutoComplete(); JsonReader reader = writer.CreatePlayer(); reader.ReadToken(JsonTokenClass.Array); reader.ReadToken(JsonTokenClass.Object); Assert.AreEqual("outer", reader.ReadMember()); reader.ReadToken(JsonTokenClass.Object); Assert.AreEqual("inner", reader.ReadMember()); reader.ReadNull(); reader.ReadToken(JsonTokenClass.EndObject); reader.ReadToken(JsonTokenClass.EndObject); reader.ReadToken(JsonTokenClass.EndArray); Assert.IsTrue(reader.EOF); }
public void AutoCompletion() { JsonRecorder writer = new JsonRecorder(); writer.WriteStartArray(); writer.WriteStartObject(); writer.WriteMember("outer"); writer.WriteStartObject(); writer.WriteMember("inner"); writer.AutoComplete(); JsonReader reader = writer.CreatePlayer(); reader.ReadToken(JsonTokenClass.Array); reader.ReadToken(JsonTokenClass.Object); Assert.AreEqual("outer", reader.ReadMember()); reader.ReadToken(JsonTokenClass.Object); Assert.AreEqual("inner", reader.ReadMember()); reader.ReadNull(); reader.ReadToken(JsonTokenClass.EndObject); reader.ReadToken(JsonTokenClass.EndObject); reader.ReadToken(JsonTokenClass.EndArray); Assert.IsTrue(reader.EOF); }
public void CannotReadPartialRecording() { JsonRecorder recorder = new JsonRecorder(); recorder.WriteStartArray(); recorder.CreatePlayer(); }