public void DatabaseExistsAfterConfiguration()
        {
            DeleteDatabase();

            SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider(CurrentDirectory, DbName)
            {
                AutomappingConfigurer = new MockAutomappingConfigurer()
            };

            NHibernate.Cfg.Configuration cfg = provider.BuildConfiguration(
                new DataServiceParameters { CreateDatabase = true });

            Assert.That(EnsureDatabase(), Is.True);
        }
        public void ClassMappingCorrectAfterConfiguration()
        {
            var mockConfigurer = new MockAutomappingConfigurer();

            SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider(CurrentDirectory, DbName)
            {
                AutomappingConfigurer = mockConfigurer
            };

            NHibernate.Cfg.Configuration cfg = provider.BuildConfiguration(
                new DataServiceParameters { CreateDatabase = EnsureDatabase() });

            Assert.That(cfg.ClassMappings.Count, Is.EqualTo(mockConfigurer.ModelCount));
        }