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)); }
public void ThrowForFileNameMissing() { SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider(""); }
public void ThrowForDataFolderMissing() { SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider("", "Null"); }
public void ThrowForDatabaseNameMissing() { SqlCeDataServicesProvider provider = new SqlCeDataServicesProvider("/", ""); }