public void TestSerializeReadOnlyProperty() { var model = new Model(); fsData data; var serializer = new fsSerializer(); Assert.IsTrue(serializer.TrySerialize(model, out data).Succeeded); var expected = fsData.CreateDictionary(); expected.AsDictionary["Getter"] = new fsData(model.Getter); Assert.AreEqual(expected, data); }
public void TestOptOutOfProperties() { var model = new Model(); fsData data; var serializer = new fsSerializer(); serializer.Config.EnablePropertySerialization = false; Assert.IsTrue( serializer.TrySerialize( model, out data ).Succeeded ); var expected = fsData.CreateDictionary(); // Should just be empty dictionary. Assert.AreEqual( expected, data ); }