public void WriteValueIJsonSerializable() { var sb = new StringBuilder(); var stringWriter = new StringWriter(sb); var jsonWriter = new JsonWriter(stringWriter); var test = new TestIJsonSerializable(); jsonWriter.WriteValue(test); Assert.AreEqual(test.ToJson(), sb.ToString()); }