public void TestCanGetConventionProfileOut()
        {
#pragma warning disable 618
            var profile = BsonClassMap.LookupConventions(typeof(A));
#pragma warning restore 618
            Assert.IsNotNull(profile);
        }
        public void SetExcludeFiltersCorrectly()
        {
            string xml      = @"<?xml version='1.0' encoding='UTF-8' ?>
                            <objects xmlns='http://www.springframework.net' xmlns:mongo='http://www.springframework.net/mongo'>  
                                <mongo:convention-profile id='Profile1'
	                                default-value='Spring.Data.MongoDb.Config.DefaultValueConvention, Spring.Data.MongoDb.Tests'>
                                    <mongo:exclude-filter type='regex' expression='.*Exclude' />
                                </mongo:convention-profile>
                            </objects>";
            var    factory  = new XmlObjectFactory(new StringResource(xml, Encoding.UTF8));
            var    profile1 = factory.GetObject <ConventionProfile>("Profile1");

            var lookupProfile = BsonClassMap.LookupConventions(typeof(MyEntityInclude));

            Assert.That(lookupProfile, Is.Not.Null);
            Assert.That(lookupProfile, Is.EqualTo(profile1));

            lookupProfile = BsonClassMap.LookupConventions(typeof(MyEntityExclude));
            Assert.That(lookupProfile, Is.Not.SameAs(profile1));
            Assert.That(lookupProfile.DefaultValueConvention, Is.Not.TypeOf <DefaultValueConvention>());
        }