public void FixtureSetUp() { BootStrapper.Bootstrap(); SessionSource = ObjectFactory.GetInstance<ISessionSource>(); SessionSource.BuildSchema(); }
private void create_schema_if_it_does_not_already_exist(ISessionSource source) { if (IsNewDatabase) { source.BuildSchema(); } }
public DatabaseFixture() { var configuration = Fluently.Configure() .Database(SQLiteConfiguration.Standard.InMemory()) .Mappings(m => m.FluentMappings.Conventions.AddFromAssemblyOf<TableNameConvention>()); SessionSource = new SingleConnectionSessionSourceForSQLiteInMemoryTesting(configuration.BuildConfiguration().Properties, new TestModel()); SessionSource.BuildSchema(); }
public void GivetAttMinFilmsamlingÄrTom() { // Initera Ioc IoCBootstrapper.Init(); // Sätta upp tom databas med korrekt schema _sessionSource = ObjectFactory.GetInstance<ISessionSource>(); _sessionSource.BuildSchema(); }
public DatabaseFixture() { var configuration = Fluently.Configure() .Database(SQLiteConfiguration.Standard.InMemory()) .Mappings(m => m.FluentMappings.Conventions.AddFromAssemblyOf <TableNameConvention>()); SessionSource = new SingleConnectionSessionSourceForSQLiteInMemoryTesting(configuration.BuildConfiguration().Properties, new TestModel()); SessionSource.BuildSchema(); }
public void SetUp() { var properties = new SQLiteConfiguration() .UseOuterJoin() .InMemory() .ToProperties(); source = new SingleConnectionSessionSourceForSQLiteInMemoryTesting(properties, new TestPersistenceModel()); source.BuildSchema(); }
public void SetupContext() { var cfg = SQLiteConfiguration.Standard .UsingFile(Path.GetTempFileName()) .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName); var fc = Fluently.Configure() .Database(cfg) .Mappings(m => m.FluentMappings.AddFromAssemblyOf<Subscription>()); sessionSource = new SessionSource(fc); sessionSource.BuildSchema(); storage = new SubscriptionStorage(sessionSource); }
public void SetUp() { var configuration = new Configuration() .DataBaseIntegration(db => { db.Driver <SQLite20Driver>(); db.Dialect <SQLiteDialect>(); db.ConnectionReleaseMode = ConnectionReleaseMode.OnClose; db.ConnectionString = "Data Source=:memory:;Version=3;New=True;"; }); var mapping = CreateTestPersistenceModel(); source = new SingleConnectionSessionSourceForSQLiteInMemoryTesting(configuration, mapping); source.BuildSchema(); }
public FilmsamlingsSteg() { // Initera Ioc IoCBootstrapper.Init(); // Sätta upp tom databas med korrekt schema _sessionSource = ObjectFactory.GetInstance<ISessionSource>(); _sessionSource.BuildSchema(); // Skapad stubbade vyer _mockSystemOut = new Mock<TextWriter>(); var antalFilmerVy = new AntalFilmerVy(_mockSystemOut.Object); var listaFilmerVy = new ListaFilmerVy(_mockSystemOut.Object); // Hämta vyrepository, som är en singleton, från IoC och lägg till stubb-vyerna var vyRepository = ObjectFactory.GetInstance<VyRepository>(); vyRepository.LäggTill(VyNamn.ANTAL_FILMER, antalFilmerVy); vyRepository.LäggTill(VyNamn.LISTA_FILMER, listaFilmerVy); }
public void SetUp() { var properties = new SQLiteConfiguration() .UseOuterJoin() //.ShowSql() .InMemory() .ToProperties(); //var properties = MsSqlConfiguration // .MsSql2005 // .ConnectionString // .Server(".") // .Database("FluentNHibernate") // .TrustedConnection // .CreateProperties // .ToProperties(); _source = new SingleConnectionSessionSourceForSQLiteInMemoryTesting(properties, new TestPersistenceModel()); _source.BuildSchema(); }
public override void establish_context() { _sessionSource = build_session_source(); _sessionSource.BuildSchema(); }
public void should_be_able_to_generate_the_schema() { _sessionSource.BuildSchema(); }
private void create_schema_if_it_does_not_already_exist(ISessionSource source) { if (IsNewDatabase) source.BuildSchema(); }
public void Execute() { _sessionSource.BuildSchema(); }