Inheritance: AbstractDataServicesProvider
コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 public void ThrowForFileNameMissing()
 {
     SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider("");
 }
コード例 #4
0
 public void ThrowForDataFolderMissing()
 {
     SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider("", "Null");
 }
コード例 #5
0
 public void ThrowForDatabaseNameMissing()
 {
     SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider("/", "");
 }