public void Should_serialize_property_set() { var propertySet = new PropertySet { { "p1", "v1" }, { "p2", null }, { "p3", 1 }, }; var copy = propertySet.Clone(); copy["p1"].ShouldBe(propertySet["p1"]); copy["p2"].ShouldBe(propertySet["p2"]); copy["p3"].ShouldBe(propertySet["p3"]); }
public void Should_serialize_property_set_2(Type type, object value) { SkipUnsupportedDataType(type, value); var propertySet = new PropertySet { { "p1", value }, }; var config = ProtoBufTypeModel.ConfigureRemoteLinq(configureDefaultSystemTypes: false) .AddDynamicPropertyType(TypeHelper.GetElementType(type)) .Compile(); var copy = propertySet.Clone(config); copy["p1"].ShouldBe(value); }