public void Dump() { var item = new Dummy(1); var settings = new JsonSerializerSettings { Formatting = Formatting.Indented }; var json = JsonSerializerAssert.ToJson(item, settings); Console.Write(json); }
public void ToJson() { var dummy = new Dummy { Value = 2 }; var json = JsonSerializerAssert.ToJson(dummy); Console.Write(json); var expected = "{\"Value\":2}"; Assert.AreEqual(expected, json); }