public void base_smoke_dictionary() { var instance = new ClassWithDictionaryOfObject(); instance.Value = new Dictionary <string, object>() { { "test", "blabla" } }; var json = instance.ToJson(); Assert.AreEqual("{ \"Value\" : { \"test\" : \"blabla\" } }", json); }
public void should_serialize_flat_in_dictionary() { var instance = new ClassWithDictionaryOfObject(); instance.Value = new Dictionary <string, object>() { { "test", new SampleId(1) } }; var json = instance.ToJson(); Assert.AreEqual("{ \"Value\" : { \"test\" : \"Sample_1\" } }", json); }