public void CorrectlySerializesToBsonString() { var testModel = new TestModel(); testModel._excludedField = "excluded"; testModel._includedField = "included"; testModel.ExcludedRegularProperty = "excluded"; testModel.IncludedRegularProperty = "included"; testModel.ExcludedCatelProperty = "excluded"; testModel.IncludedCatelProperty = "included"; var configuration = new JsonSerializationConfiguration { UseBson = true }; var json = testModel.ToJson(configuration); Assert.IsFalse(json.Contains("Excluded")); }