Catel.Test.Runtime.Serialization.JsonSerializationFacts.AdvancedSerializationFacts.CorrectlySerializesToBsonString C# (CSharp) Method

CorrectlySerializesToBsonString() private method

private CorrectlySerializesToBsonString ( ) : void
return void
            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"));
            }