public void TestCreateDictionaryWithCSharpDictionary() { var dict = new Dictionary <string, object> { ["street"] = "1 Main street", ["city"] = "Mountain View", ["state"] = "CA" }; var address = new MutableDictionaryObject(dict); address.Should().BeEquivalentTo(dict, "because that is what was stored"); address.ToDictionary().Should().BeEquivalentTo(dict, "because that is what was stored"); var doc1 = new MutableDocument("doc1"); doc1.SetDictionary("address", address); doc1.GetDictionary("address") .Should() .BeSameAs(address, "because the document should return the same instance"); Db.Save(doc1); var gotDoc = Db.GetDocument("doc1"); gotDoc.Should().NotBeNull(); gotDoc.GetDictionary("address") .ToDictionary() .Should().BeEquivalentTo(dict, "because the content should not have changed"); }