Permalink
Browse files

Minor.

  • Loading branch information...
1 parent 51b1b70 commit 963a45f9b27019e69e2c952b58d8e9aaecb940bf @lanwin lanwin committed May 7, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 source/MongoDB.Tests/UnitTests/Serialization/SerializationFactoryTests.cs
View
18 source/MongoDB.Tests/UnitTests/Serialization/SerializationFactoryTests.cs
@@ -51,5 +51,23 @@ public void CanNotCreateObjectFromPrivateConstructor()
Assert.IsNotNull(obj);
}
+
+ public class SetProtectedPropertys
+ {
+ protected double Property { get; set; }
+
+ public double GetProperty() {return Property; }
+ }
+
+ [Test]
+ public void CanSetProtectedProperty()
+ {
+ var bson = Serialize(new Document("Property", 4));
+
+ var prop = Deserialize<SetProtectedPropertys>(bson);
+
+ Assert.IsNotNull(prop);
+ Assert.AreEqual(4, prop.GetProperty());
+ }
}
}

0 comments on commit 963a45f

Please sign in to comment.